
433 N.W.2d 140 (1988)
GREEN TREE ACCEPTANCE, INC., Petitioner,
v.
MIDWEST FEDERAL SAVINGS AND LOAN ASSOCIATION OF MINNEAPOLIS, Respondent.
No. CX-88-2257.
Court of Appeals of Minnesota.
December 13, 1988.
*141 J. Patrick McDavitt, Briggs and Morgan, Minneapolis, for petitioner.
Thomas Harms, Hessian, McKasy & Soderberg, Minneapolis, for respondent.
Considered at Special Term and decided by WOZNIAK, C.J., and PARKER, J. without oral argument.

SPECIAL TERM OPINION
WOZNIAK, Chief Judge.

FACTS
Petitioner Green Tree buys and services conditional sales contracts. In 1985 Green Tree sold a portfolio of contracts to respondent Midwest Federal. Green Tree continued to service the contracts for Midwest Federal. A further agreement relating to the sale was reached in 1987.
Green Tree argues that Midwest Federal effectively released all potential claims, and it brought a declaratory judgment action in state district court to construe the 1987 agreement. One day later, Midwest Federal brought suit in federal district court, alleging negligence, fraud and misrepresentation, breach of contract, and violation of federal statutes arising from the 1985 purchase of contracts from Green Tree. The federal suit involves numerous parties.
Green Tree moved the federal court to stay proceedings pending determination by the state court on the effect of the 1987 agreement. That motion was denied on October 19, 1988. Midwest Federal moved the state court to stay all proceedings pending resolution of the federal action. By order on October 25, 1988 that motion was granted. Green Tree seeks a writ of mandamus to compel the state court to proceed.

DECISION
Mandamus will lie to compel the trial court to do that which is clearly required, but it cannot control judicial discretion. Minn.Stat. § 586.01 (1986). It may be appropriate to compel the trial court to decide a pending matter, where the trial court has erroneously concluded that it lacks jurisdiction to proceed. See, e.g., Miller v. Benner, 293 Minn. 400, 196 N.W.2d 293 (1972) (mandamus issued to compel municipal court to decide unlawful detainer action which did not, as trial court had ruled, actually involve title to real estate, which was beyond municipal court jurisdiction); McLean Distributing Co. v. Brewery & Beverage Drivers Local 993, 254 Minn. 204, 94 N.W.2d 514 (1959) (mandamus issued to compel state court to decide suit seeking injunction against strike, where matter held not to be within exclusive jurisdiction of federal courts and NLRB). The trial court in this case did not hold that it lacked jurisdiction over Green Tree's declaratory judgment action; it decided that a stay of the action in state court was appropriate.
Where two courts have concurrent jurisdiction, the first to acquire jurisdiction generally has priority to decide the *142 case, although that rule has exceptions. Minnesota Mutual Life Insurance v. Anderson, 410 N.W.2d 80, 82 (Minn.Ct. App.1987). In deciding whether to defer to another court, a trial judge must determine which action will best serve the parties' need for a comprehensive solution, consider judicial economy, cost and convenience to the litigants, and assess the possibility of overlapping multiple determinations of the same dispute. Id. (Citations omitted.) The desirability of avoiding piecemeal litigation is also a factor in the test applied by the federal courts in deciding whether to defer to concurrent state court proceedings. See Colorado River Water Conservation District v. United States, 424 U.S. 800, 818, 96 S.Ct. 1236, 1246, 47 L.Ed.2d 483 (1976).
The trial court here recognized that the same parties are involved in the federal action, decision in the federal court presents little physical inconvenience (since all counsel are located in the Twin Cities), the state action would require duplicate discovery, decision on the state claim will not dispose of all issues pending in the federal court, and that the state action will not finally determine the entire controversy, but "would result in nothing more than a rehashing of parts of litigation already accepted by the United States District Court." Finally, the trial court found that Green Tree would not be prejudiced by a stay of the state court action. The petition for mandamus filed in this court also fails to clearly identify what harm might be suffered by Green Tree as a result of the stay.
Petition for writ of mandamus denied.
SHORT, J., took no part in the consideration or decision of this matter.
