I own a house in the District that I have been renting out for years. I would like to sell it by way of a Starker exchange but understand that I have to give my tenants a right to purchase. How does this work, and will it interfere with my right to swap the property?

This type of exchange is also known as a “like-kind,” or Section 1031, exchange. It is a way to offload one investment property and replace it with another while deferring capital gains tax on the deal. Technically, instead of selling one and buying another, you’re trading them.

As you’ve pointed out, the District has a unique law that favors tenants called the Tenant Opportunity to Purchase Act (TOPA). It basically says that before a landlord can sell a rental property, the property’s tenants must be given the right to buy it.

Owners of single-family homes must send tenants one of two TOPA forms, depending on whether they have already received an offer on the property from a third party. One is the “Offer of Sale Without a Third-Party Contract” and the other is the “Offer of Sale With a Third-Party Contract.” Both must include the proposed selling price and the material terms of the sale.

Real estate agents should provide these forms to you. You can also search on the Web for “District of Columbia tenant opportunity to purchase” and click on the information provided by D.C.’s Department of Housing and Community Development.

The tenant has 30 days from the date of receiving the form to advise the landlord (and the District) of his or her interest in buying the home. The tenant then has 60 days to negotiate a contract and 60 more days to go to settlement. But if his or her lender needs additional time, the tenant receives a 30-day grace period.

No matter which TOPA form is used, the landlord must send one in English and one in Spanish. Several years ago, a landlord’s lawyer in court questioned the Spanish requirement. The lawyer told the Judge “neither my client, the tenant nor I speak or read Spanish.” The judge said: “Neither do I , but that’s the law.”

If you own a building with more than four rental units, the rules are different.

In this case, the tenants have to form an organization if they are interested in buying the property. The law requires that the tenants form an organization. That organization must notify the District and the landlord no later than 45 days after receiving the TOPA notice that it has been formed and is interested in buying. In such cases, the tenant association has at least 120 days to negotiate a contract and up to 240 days to obtain financing and go to settlement. Only the tenant association has the authority to negotiate with the landlord under these circumstances.

The rules differ again in buildings with two to four rental units.

In those cases, for the first 15 days after receiving the TOPA notice, a group of the tenants has the right to advise the owner of an interest in purchasing, although the tenants do not have to form an association. If that does not happen, then any one of the tenants has seven days to tell the landlord of an interest to buy.

Once this notice is provided, the tenant (or tenants) have 90 days in which to enter into a contract, and another 90 days to obtain financing and go to closing. If the lender requests more time, the landlord must provide it.

It is important for the landlord to file a TOPA notice with the District or else the potential buyer may not be able to get a clean title insurance policy. Tenants can file suit against a potential purchaser claiming that they never received the TOPA notice, even after the property is sold to a third party. The title insurance industry is extremely skittish about giving buyers — and lenders — a clean title insurance policy if the landlord has not complied with TOPA rules. Accordingly, title lawyers must satisfy themselves that all procedural requirements were met. Additionally, tenants also are asked to sign an affidavit acknowledging that they have received the TOPA notice, elected not to exercise their tenant rights and have not assigned their rights to any third party.

Assignment of rights has become an interesting sideline for many speculators. Under D.C. law, not only does a tenant have the right to buy the property in which he or she is residing, but also has the right to assign the TOPA rights to a third party. Typically, the tenant will get a sum of money to transfer the TOPA rights, and the third party will either flip the contract to someone else or go to settlement.

Can you arrange a Starker exchange for your rented property? Yes, but there are risks. To have a successful exchange, you must identify the replacement property within 45 days after you sell the relinquished property (your current house) and go to settlement within 180 day from the date of sale. In today’s market conditions, because it is often difficult to find an acceptable replacement property, many exchangers start looking even before their current house is sold.

However, the TOPA process can drag on for a long time. And ultimately, the tenant may not be able to qualify for a mortgage and the landlord has to start the process all over again. By then, houses that may have been considered potential replacement property may be long gone.

TOPA has generated controversy and a lot of litigation since it was enacted in 1980. Regardless of which side you are on, the rules and requirements must be carefully followed. As the judge said, “It’s the law.”

Benny L. Kass is a Washington lawyer. This column is not legal advice and should not be acted upon without obtaining your own legal counsel. 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, 1050 17th St. NW, Suite 1100, Washington, D.C. 20036.