
264 N.W.2d 643 (1978)
RELOCATION REALTY SERVICES CORP., Respondent,
v.
CARLSON COMPANIES, INC., formerly known as C. C. Carlson Service Corporation, Respondent,
Stanley E. Rakieten, Appellant,
Marilyn R. Rakieten, Defendant.
Nos. 47726, 48080.
Supreme Court of Minnesota.
March 17, 1978.
Rehearing Denied April 28, 1978.
Gainsley, Squier & Korsh and Phillip Gainsley, Minneapolis, for appellant.
Bell, Stapleton & Nolan and Mark M. Nolan, St. Paul, for Relocation Realty.
Levitt, Palmer, Bowen, Bearmon & Rotman and John Troyer, Minneapolis, for Carlson Companies, Inc.
Heard before KELLY, YETKA, and SCOTT, JJ., and considered and decided by the court en banc.
*644 SCOTT, Justice.
This is an appeal from an order of the Hennepin County District Court denying appellant's motion for a new trial or for amended findings of fact, conclusions of law, and order for judgment and from the judgment. We reverse.
In April 1971, appellant, Stanley E. Rakieten, accepted an offer to become president of Peter's Meats, Inc. (Peter's). Peter's was a subsidiary of respondent, Carlson Companies, Inc. (Carlson Companies).[1] Rakieten's compensation agreement did not include reimbursement by Peter's or Carlson Companies for the expenses of selling his home in Illinois. Rakieten began his employment at Peter's in May 1971, and during May and June he lived in a Minneapolis hotel and commuted to his home in Illinois on weekends. In June 1971, he listed his home with an Illinois realtor for sale.
In early August 1971, Rakieten learned that respondent Relocation Realty Services Corp. (Relocation) was interested in providing its services to Carlson Companies on a long-term basis. Relocation provides services to employers in the transfer and relocation of executive personnel. Relocation purchases and sells a relocated executive's home and charges a fee to the employer. The fee is designed to cover Relocation's costs and expenses in purchasing and selling the executive's home, possible loss on the resale, plus overhead, and a profit margin.
On August 17, 1971, Edward Carroll, then Relocation's vice president, contacted Dorayn H. Kemnitz, Carlson Companies' director of personnel. He wished to use Rakieten's home as an example of the services provided by Relocation. Kemnitz informed Carroll that Rakieten was employed by Peter's Meats, but she was noncommittal about Carlson Companies' or its affiliates' using the services of Relocation on a long-term basis. She did tell Relocation to go ahead and use "live figures" based on the Rakieten house for their example, if that was what they wished to do. She testified, however, that at no time had she agreed on behalf of Carlson Companies or Peter's to pay Relocation's fees.
On or about August 17, 1971, Relocation contacted Rakieten and obtained his consent to their sending appraisers to his home. About 1 week later Carroll L. Hasler, chairman of the board of Relocation, called Rakieten and offered to purchase his home for $81,500. Rakieten accepted over the phone, and Relocation forwarded the necessary papers. The papers were executed and returned to Relocation.
On August 31, 1971, Rakieten informed Kemnitz of his acceptance of the Relocation offer. Rakieten asked her to seek the approval of Curtis Carlson, president of Carlson Companies, and informed her that he would try to get Relocation to lower its fee. Later that day, Hasler contacted Kemnitz pursuant to Rakieten's suggestion. Hasler apologized for the precipitous way in which Relocation had proceeded and suggested that they would go ahead on a cost-only basis. Kemnitz informed Hasler that she needed Curtis Carlson's approval but was reluctant to go to him. When Hasler called back with an estimate of the costs involved, Kemnitz reiterated that she needed Curtis Carlson's approval. According to Hasler, Kemnitz called him back on August 31, 1971, and told him to go ahead on a cost basis and "[s]end the bill to Stanley Rakieten at Peter's Meats." Rakieten testified that he believed Relocation would go ahead with the deal "unless somebody gave [him] other indications."
Between August 31, 1971, and December 14, 1971, Relocation purchased the Rakieten home in Illinois and sent Rakieten a check for $81,500 less the principal balance on his mortgage. Relocation resold the home for $79,500. On December 14, 1971, Relocation sent a bill to Rakieten at Peter's, requesting payment for their costs and expenses in the purchase and sale of the home. The costs, amounting to $8,512.66, included Relocation's loss on the transaction and fees charged by the Illinois broker who handled the actual sale of the home.
*645 Rakieten testified that he intended that the bill be paid; however, that bill and a lot of other bills at Peter's were not paid. In December 1971, a new financial officer was hired and all checks over $5,000 had to be signed by two officers of the company. In July 1972, Rakieten was relieved of his authority to write checks. In August 1972, Peter's filed for bankruptcy.
The trial court awarded Relocation $8,512.66 from Rakieten on a theory of unjust enrichment; it found that Carlson Companies and Rakieten's wife were not liable to Relocation and that Carlson Companies was not liable to the Rakietens. Because we hold that Relocation, as an unlicensed real estate broker, could not maintain this action for its compensation, we must reverse the trial court.[2]
Rakieten alleged in his answer, in a later motion for summary judgment, at trial, and again on appeal that Relocation was barred from bringing suit by Minn.St.1971, § 82.16, subd. 2, which provided:
"No person shall bring or maintain any action in the courts of this state for the collection of compensation for the performance of any of the acts mentioned in Minnesota Statutes, Sections 82.01 to 82.16, without alleging and proving that he was a duly licensed real estate broker or salesman at the time the alleged cause of action arose."[3]
Relocation neither alleged nor proved that it was a duly licensed real estate broker in Minnesota, and there is nothing in the record to indicate that it was licensed in either Minnesota or Illinois. The trial court found that Relocation was not a real estate broker because it acted solely on a cost basis, that Minnesota law did not apply because Illinois property was involved, and that the action was for costs and not for compensation.
The trial court was in error in finding that Relocation was not a broker. Minn.St.1971, § 82.01, subd. 4, defined real estate broker, in part, as
"* * * any person * * * who, for a fee, commission or other valuable consideration, or who with the intention or expectation of receiving or collecting the same, lists, sells, purchases, exchanges, rents, or leases any real estate * * * or who negotiates or attempts to negotiate any such activity; or who advertises or holds himself or itself out as engaged in such activities * * *."[4]
There is no question that Relocation held itself out to be a company engaged in the purchase and sale of real estate for a fee and that it in fact negotiated the purchase of the Rakieten's property in Illinois with the expectation of receiving a fee. Thus, it fits clearly within the definition of real estate broker.
Relocation asserts that it may maintain this action for out-of-pocket costs even if it is not licensed because it is not an action for "compensation." The trial court held that compensation was limited to "fee, commission or other valuable consideration" and that out-of-pocket costs were not included.
In Albers v. Fitschen, 274 Minn. 375, 143 N.W.2d 841 (1966), we construed Minn.St. 1959, § 82.16, holding that it was in the nature of a statute of limitations which could be waived, but noting that it was part of a legislative scheme to protect the public against unqualified brokers. We hold that the purposes of the broker-licensing law will be best advanced by construing the statutory bar to include the present suit.
It is clear from the nature of Relocation's representations that the recovery of its costs was a factor in determining the fee which it charged. Cost recovery is always a part of the compensation for a real estate *646 broker by way of fee or commission. The limitation of recovery to costs does not change the essential nature of the action. If we were to hold that "action for compensation" did not include the present case it would serve to encourage unlicensed brokerage. An unlicensed broker could operate in this state and be certain that even if its fee was not paid it could always recover costs and interest. This would greatly decrease the risks of doing business by unlicensed brokers and dilute the protections provided to the public.[5] Thus, the lawsuit should have been dismissed on Rakieten's first motion.
Reversed.
NOTES
[1]  Carlson Companies was variously known as Premium Service Corporation and Gold Bond Stamp Company. We shall refer to it throughout as Carlson Companies.
[2]  Our disposition of this issue makes it unnecessary to decide the other issues raised by appellant.
[3]  At the time this lawsuit was commenced Minn.St.1971, § 82.16, had been repealed. Minn.St. 82.33, which replaced it, is substantially similar and application of that statute would not change the result in this case.
[4]  This statute is substantially similar to Minn.St. 82.17, subd. 4(a).
[5]   The contention that Illinois law applies is wholly without merit. The statute does not bar the suit, but only bars it from the courts of this state. It is difficult to see what it would mean to apply Illinois law in this case.
