Q: Recently, we purchased a new house in Virginia from a developer. It turns out that one of the developer's subcontractors had filed a mechanic's lien against all of the houses in the subdivision because he had not been paid for his work. In light of that, how could our purchase have been approved?

A: In most cases, if someone owes you money, you have to file suit, obtain a judgment and then try to collect on that judgment. Once you have a court-ordered judgment, it is possible to sell the property of the debtor to satisfy that claim.

Mechanic's liens permit workmen and other artisans an opportunity to place a "cloud" on real estate even before a valid court judgment has been obtained. The first such statute in this country was passed by the Maryland legislature in 1791. It said that contractors engaged in the construction of the new national capital could have a lien on the real property to secure payment by the government.

Today, most states have mechanic's lien statutes to protect workers and insure payment for improvements made to property. The law isn't limited to property, however.

For example, if you bring your automobile to a garage and do not pay your bill, the garage owner may be able to hold onto your car until the bill is paid.

There are some differences between mechanic's lien statutes in this area. Here is a summary:

Virginia: The Virginia code permits a subcontractor who helps construct houses in a subdivision to obtain a lien against the houses. In order to perfect such a lien, the subcontractor must file adequate documentation setting forth the details of the lien to be claimed with the local clerk. In addition, the subcontractor must give notice to the property owner of the amount and character of the lien.

Owners of property have an affirmative defense to such liens. Virginia law provides that it is a defense if the owner is not indebted to the general contractor. Thus, when you buy your house, and the developer is paid in full, any liens which have or may be filed can be legally and successfully defended. It should be pointed out, however, that the lien claimant can file the lien up to 90 days after completing the construction.

District of Columbia: In order to obtain a lien in the District, the subcontractor must file a notice detailing the lien claim with a recorder of deeds within three months after completion of the construction. The lien must be in the name of the person who owns the property at the time the lien is filed so that all interested parties will have notice of the lien.

Even though the current owner is named in the filed lien, however, the owner is not necessarily the person liable on the mechanic's lien. District law provides that the amount recoverable by the subcontractor, for example, is limited to the amount that is due the general contractor. Thus, if the owner does not owe the general contractor anything, the owner owes nothing to the subcontractor.

Maryland: Maryland is the only one of the three local jurisdictions that expressly protects purchasers of property who were unaware at the time of purchase of any potential liens.

As in other jurisdictions, a subcontractor in Maryland must provide notice to property owners withing 90 days of doing the work, of the details and the amount of the lien the subcontractor intends to obtain.

Additionally, within 180 days of completing the work, a subcontractor must actually file a petition in court detailing the nature of the claimed lien.

However, Maryland law protects the property purchaser by providing that the lien may not be claimed, if, prior to the establishment on a lien, legal title has passed to a bona fide purchaser for value. In simple English, a new-home purchaser should qualify as a "bona fide purchaser."

Thus, in Maryland, if you are a new-home buyer, you have an absolute defense to such liens.

But buyers in Virginia must use caution.

Here are some suggestions for protecting yourself against any such liens:

At settlement, insist that your title attorney or settlement company obtain an affidavit from the seller that no work has been done on the property within the past 90 days. If work has been done, the affidavit should further state that the seller has fully paid all the contractors and the subcontractors.

You may also want to obtain a release of mechanic's lien at settlement. This is a form each contractor and subcontractor signs indicating that they have been paid in full for the work performed.

If there is any question in your mind about a possible mechanic's lien, insist that the title attorney handling settlement escrow some funds out of which any such claims can be paid. Although most sellers will object to an escrow arrangement, it may be the only real protection you can obtain.

You should discuss these matters with your legal and financial counselor if you have any concerns.