
446 N.W.2d 808 (1989)
FEDERAL LAND BANK OF OMAHA, Appellee,
v.
Richard A. LOCKARD and Christina M. Lockard, Appellants.
No. 88-1332.
Supreme Court of Iowa.
October 18, 1989.
Rehearing Denied November 22, 1989.
Peter C. Riley, Cedar Rapids, for appellants.
Dale L. Putnam, Decorah, for appellee.
Considered by McGIVERIN, C.J., and LARSON, LAVORATO, NEUMAN and ANDREASEN, JJ.
LARSON, Justice.
This case involves the collectibility of a deficiency judgment in favor of Federal Land Bank of Omaha (the land bank) following a sheriff's sale of land previously owned by Richard and Christina Lockard. Lockards claim the land bank lost its right to collect the deficiency judgment by waiting more than two years after the entry of the judgment. See Iowa Code § 615.1 (1987). The land bank responds that it had not attempted to enforce the judgment because of Iowa Code section 654.6 (1987), which imposed a collection moratorium until July 1, 1991, and suspended the two-year limitation of section 615.1. The district court ruled that, because section 654.6 prevented enforcement within the two-year period of section 615.1, the land bank's deficiency judgment was still valid and therefore denied Lockards' motion to discharge it. We affirm but on different grounds.
On appeal, three issues are raised: (1) does section 654.6 apply to this case; (2) is it constitutional; and (3) if it is applicable to this case, but unconstitutional, should the parties be granted equitable relief?
The facts are not disputed. The mortgage was foreclosed by a decree of January 6, 1986, and the land was sold at sheriff's sale on March 4, 1986. The sale left a substantial deficiency judgment, and a receivership was established on March 10, 1986, with the income to be applied to the deficiency. The receivership was terminated by a court order of March 22, 1987.
In the meantime, the Iowa Legislature passed the section-654.6 moratorium and made it effective "to actions pending on June 1, 1986, and actions commenced on or *809 after June 1, 1986, but before July 1, 1991." Iowa Code § 654.6(4). This raises the first issue, whether the present action was "pending" on June 1, 1986.
I. Lockards argue that, because the decree of foreclosure was entered on January 6, 1986, the case could not be pending on June 1 of that year. The land bank counters that the decree retained jurisdiction "for the purpose of entering any necessary orders in the future which the court may deem necessary." On March 6, 1986, the receiver was appointed. On March 24, 1986, and April 22, 1987, orders were entered approving the receiver's interim and final reports, respectively. Because these proceedings in the receivership postdated June 1, 1986, and bore directly on the amount of the deficiency judgment remaining, we hold that the case was still "pending" when the moratorium act became effective as of June 1, 1986.
II. This case is quite unusual in that both sides argue that section 654.6 is unconstitutional. Lockards claim it violates the equal protection provisions of the fourteenth amendment to the United States Constitution and article I, section 6 of the Iowa Constitution by imposing the moratorium only on specified lenders. The land bank agrees and argues in addition that the statute violates the impairment of the obligation of contract provisions of article I, section 10 of the United States Constitution.
Section 654.6 provides for execution on deficiency judgments but goes on further to provide:
However, a deficiency judgment or general execution premised upon the deficiency judgment issued against the mortgagor shall not be enforceable until July 1, 1991 if all of the following apply:
1. The mortgaged property is agricultural land.
2. The mortgagor was actively engaged in farming the agricultural land upon the commencement of the action which resulted in a deficiency judgment.
3. The action was for the foreclosure of a first mortgage on the agricultural land or for the enforcement of an obligation secured by a first mortgage on the agricultural land.
4.The first mortgage secures a loan obligation, where a condition for the making of the loan was that the borrower purchase or own stock in the entity making the loan or in an entity related to the lending entity. This requirement is satisfied if there was such a condition at the time the original loan was made.

5. The mortgagor does not exercise the exemptions provided under section 627.6 in relation to the deficiency judgment or a general execution premised upon the deficiency judgment.
(Emphasis added.) Section 654.6 further provides that "[t]he running of time periods affecting the enforceability of the deficiency judgment or general execution is suspended until July 1, 1991."
The land bank and Lockards agree that, because it is limited to lenders who require the purchase of stock as a condition of the loan, the moratorium statute applies only to Farm Credit System lenders, specifically the Federal Land Bank and the Production Credit Association. See 12 U.S.C. § 2034 (1983) (purchase of stock required for Federal Land Bank loan); 12 U.S.C. § 2094 (1983) (purchase of stock required for PCA loan).
In resolving the equal protection argument, we begin with the assumption that the distinction drawn in the statute does not involve a fundamental right or an inherently suspect classification and will therefore withstand an equal protection challenge if there is any rational basis to support it. See Federal Land Bank v. Arnold, 426 N.W.2d 153, 156 (Iowa 1988) (citing Metropolitan Life Ins. Co. v. Ward, 470 U.S. 869, 881, 105 S.Ct. 1676, 1683, 84 L.Ed.2d 751, 761 (1985); New Orleans v. Dukes, 427 U.S. 297, 303, 96 S.Ct. 2513, 2516-17, 49 L.Ed.2d 511, 517 (1976)).
In Arnold, a similar question was raised: whether lenders who were not "member" lending institutions, i.e., those who were not members of the FDIC or FSLIC, were *810 denied equal protection by a statute which applied a different period for redemption for nonmember lenders. We found that there was no rational basis for the distinction and held the statute to be unconstitutional. Arnold, 426 N.W.2d at 157.
We use a two-step analysis in applying the rational-basis test: Is the goal legitimate, and if so, are the means to that end acceptable? Even if the goal of a statute is desirable, the guarantee of equal protection is violated if wholly arbitrary classifications or invidious discriminations are involved. Id. at 156 (citing Chicago Title Ins. Co. v. Huff, 256 N.W.2d 17, 28 (Iowa 1977)).
Nothing in the legislature's statement of purposes accompanying this statute gives a reason for applying the moratorium only to Farm Credit Service lenders, see 1987 Iowa Acts ch. 142; and we are at a loss to find any basis, rational or not, for such a distinction. There seems to be no connection between restrictions on the collection of a deficiency judgment and the original purchase of stock. In fact, it appears that at the time of the original loan to Lockards, stock was required only to allow borrowers a voice in the operation of the land bank. See 12 U.S.C. § 2034(b) (1983).
We conclude that Iowa Code section 654.6 (second unnumbered paragraph) violates the federal and state guarantees of equal protection and is therefore unconstitutional.
III. Here, the land bank was caught on the horns of a dilemma. Iowa Code section 615.1 requires that enforcement procedures on a deficiency judgment be brought within two years from the date of the judgment. In this case, that would be January 6, 1988. Iowa Code section 654.6, however, purported to provide that no enforcement proceedings could be commenced until July 1, 1991, and suspended the running of the statute of limitations under section 615.1. The land bank, relying on section 654.6, did not attempt to collect on its judgment before the expiration of the two-year period. The question now raised is whether the land bank may now be permitted to collect on its deficiency judgment at all. If the moratorium provisions of section 654.6 do not suspend the running of the statute of limitations, the land bank is too late under section 615.1 to enforce its deficiency judgment.
This case is in equity, where we have considerable flexibility in framing a remedy. See Iowa Dep't of Social Servs. v. Blair, 294 N.W.2d 567, 570 (Iowa 1980); 30A Am.Jur.2d Equity § 599, at 666-69 (1965). Holding the land bank to the two-year limitation under section 615.1, as urged by Lockards, would leave it without any remedy. On the other hand, a precipitous voiding of the moratorium statute without some relief to borrowers who have relied on it would be unfair to them.
We conclude that the land bank and all other lenders covered by the moratorium provision of section 654.6 should be granted two years from July 1, 1990, to enforce their deficiency judgments. To protect Lockards and other debtors from immediate enforcement proceedings, we hold that no action to enforce such deficiency judgments shall be commenced before July 1, 1990.
We affirm the district court's refusal to discharge the judgment and remand for entry of an order providing for relief to the parties in accordance with this opinion.
AFFIRMED AND REMANDED.
