QI am a landlord in the District of Columbia. I plan to sell my house and do a Starker exchange. I understand that tenants have certain rights, but I also know that there are certain time restrictions associated with the exchange. Is it possible to do a Starker when there are tenants in the property?

AYes, but you have to carefully coordinate the process.

A Starker, or like-kind, exchange is a way to defer tax on the capital gains you have made on your investment property. Under Section 1031 of the Internal Revenue Code, if you swap one investment property for another, your tax basis of the old property (called the relinquished property) becomes the tax basis of the new property (called the replacement property). If the cost of the replacement property is equal to or greater than the sales price of the relinquished property -- and if the net proceeds from the relinquished property go directly into the purchase of the replacement property -- the tax code allows you to defer paying capital gains tax.

However, there are important time restrictions. You must identify the replacement property within 45 days from the date the relinquished property is sold, and you must actually take title to the replacement property within 180 days of the earlier sale.

These time restrictions cannot be extended under any circumstances. And that is where the interplay between tenant rights and the Starker exchange becomes tricky.

Tenants in the District of Columbia have very strong rights. Over-simplified, even when the tenants' lease expires, they have the absolute right to remain in the property on a month-to-month basis. They cannot be asked to leave or be evicted unless certain things occur.

There are only 10 grounds for evicting a tenant in the District of Columbia, the most common being (1) nonpayment of rent, (2) violating the terms of the lease, and having been given 30-day written notice (in English and Spanish) of an opportunity to cure the violation, and (3) the owner -- or a subsequent purchaser -- wants to take personal possession of the property.

In the latter case, the tenant must be given 90 days' notice, again in English and Spanish. The person claiming personal use and occupancy cannot rent out the property for a full year following possession.

Tenants also have significant rights when the landlord wants to sell. Although the law differs slightly when there are two to four rental units in a building and when there are more than four rental units, in this article I will address only the situation in which there is a single-family residence.

First, you must determine whether you are exempt from rent control. If you own four or fewer rental units in the District -- and you have filed an exemption form with the Housing Regulation Administration of the city's Department of Consumer and Regulatory Affairs -- you will be exempt. If you own more than four rental units in the District, or if the property is held by a corporation or a partnership, you must register the property with this same government agency.

While exemption from the rent control laws has no real bearing on your ability to sell the property, it is always advisable to comply with the registration/exemption laws. It is an extra precaution that may make your life a little easier should you get involved in a dispute with your tenants.

DCRA has published forms that are easy to use and understand, and they are available in Room 7238, 941 N. Capitol St. NE. These forms walk you -- and your tenant -- through the process. If you own a single-family home (which would include a condominium or a cooperative unit), you should obtain two forms: "Offer of sale and tenant opportunity to purchase with a third-party contract" and "Offer of sale and tenant opportunity to purchase without a third-party contract."

Although the process is relatively easy, there is a legally required schedule and it can take significant time.

First, your tenant should be given a copy of the applicable form, filled in and signed, preferably by certified mail, return receipt requested, as well as by regular mail. You, as owner, can sign the form, or you can ask your lawyer or your real estate broker to sign as your agent. If there already is a sales contract from a third party, a copy of that contract must accompany the form.

Then, the tenant has 30 days from the date of receiving the form in which to provide you with a written statement indicating interest in purchasing the property. If the tenant does not provide such a written statement within this 30-day period, his right to negotiate a sales contract expires. However, as I'll discuss a bit later, tenants still have an absolute 15-day right of first refusal, which begins after all other rights expire.

Let us assume that the tenant -- within the 30 days -- advises you of his interest in purchasing your property. The tenant then has a minimum of another 60 days in which to attempt to negotiate a sales contract with you.

As landlord, you are obligated to negotiate in good faith. However, unless the tenant makes an offer that is identical in all respects to the terms and conditions of the third-party contract, you are not required to enter into a contract with your tenant. The law does not require you to take less for your property than you would get from the third-party contract purchaser.

D.C. law makes it very clear that the rights of any third-party contract purchaser are subordinate to the rights of the tenant. In other words, even though you may have a binding contract with a third party, you have the absolute right to negotiate with your tenant -- and ultimately enter into a contract with him.

If you and the tenant reach agreement, you should sign another contract with your tenant. The earnest money deposit cannot exceed 5 percent of the selling price. Once such a contract is signed, the tenant has a minimum of 60 additional days to secure financing and go to settlement. If a lending institution proposing to make a loan to the tenant needs additional time to evaluate your house and the creditworthiness of your tenant, you must extend the time for settlement for another 30 days.

Finally, and no matter whether the tenant advises you of his interest to purchase within the first 30 days from receiving the form, all tenants in the District of Columbia have an absolute 15-day right of first refusal. That means that if the tenant matches -- term for term -- the third-party contract, the tenant has the right to buy your house. That time period begins after all the others end.

Tenants have the right to bring in outside investors who can either buy the property directly from you (using the tenant as a conduit) or enter into a form of partnership with the tenant to assist him in going to closing.

Thus, as you can see, tenant rights are strong in the city. You should document your efforts to comply with this law, which is referred to as the Tenant Opportunity to Purchase Act. The settlement attorney will ask you to sign an affidavit that you have fully complied with the law.

Now, let's get back to your proposed Starker exchange. As you can see, whether your tenant or a third party buys your investment property, there are many uncertainties -- and many time requirements -- involved. Thus, you will probably not be able to determine the starting date for the Section 1031 time limitations until you actually go to settlement on the relinquished property.

What should you do? You certainly can start looking for that replacement property. Keep in mind that you have a lot of choices. You can swap your single-family house in the District for any other investment in real estate -- an office building, raw land, a condominium unit or a cooperative apartment. The law merely requires that you exchange real estate for real estate.

You can also identify up to three replacement properties within the 45 days. Once you have identified the property you would like to use for the exchange, you can sign a contract to purchase it.

However, most sellers will not be willing to wait for an indefinite period of time before you go to settlement. If that is the case, you may have to wait until you actually have settled on the relinquished property before you contract to buy the replacement property.

When you go to settlement on your current house, make absolutely sure that all of the net proceeds are put in escrow with a third party, called an intermediary. If you have any control over these funds, you will lose the ability to do the exchange.

Many investors have made a lot of money on their rental properties, and the Starker exchange makes a lot of sense for them. However, the timing restrictions contained in D.C. law and the federal tax code are tricky and require coordination and planning.

Benny L. Kass is a Washington lawyer. For a free copy of the booklet "A Guide to Settlement on Your New Home," send a self-addressed stamped envelope to Benny L. Kass, Suite 1100, 1050 17th St. NW, Washington, D.C. 20036. Readers may also send questions to him at that address.