In May, real estate investor Justin Pierce bought what he considered the ugliest house on the 4100 block of Henson Lane in Temple Hills.

Built in the 1940s, the vacant rambler was visibly worn out, with faded white shaker siding and thinning black roof shingles. The shrubbery was gradually swallowing the tiny 800-square-foot structure.

The inside was just as unappealing. You had to walk through one of the two bedrooms to get to the only bathroom in the house. With no interior stairway, you also had to walk outside to get to the unfinished basement. All the major systems were outdated.

In taking on this renovation project, Pierce had some big goals: He wanted to modernize every inch of the house and double its size. The renovated house is hardly a mansion, but Pierce says it is ideal for first-time buyers or a young family. He also wanted to complete the work by Oct. 1 to take advantage of a short window of opportunity to sell the house before the market cool-down that typically stretches from Thanksgiving to spring.

After six months’ work, Pierce has transformed the property into a two-story, 1,600-square-foot house with four bedrooms, three bathrooms, hardwood floors, granite countertops and stainless-steel appliances. But he encountered obstacles at almost every turn, which put him about $20,000 over budget and delayed completion by nearly a month.

Real estate investing — or property flipping — is not for the faint of heart, Pierce says.

“We move fast in the beginning on these deals so you only get a limited time to do your due diligence,” Pierce says. “You only get to make a real rough plan and adjust on the fly.”

He adds: “You have to factor for the unknown. There are always surprises, some good and some bad.”

With their singular focus on turning a quick profit, real estate investors are often regarded about as warmly as used-car salesmen. But experts say they’ve played a major role in spurring the housing market’s recovery. By targeting distressed properties, they’ve reduced neighborhood blight and increased the supply of homes in a region where inventory has been very tight.

Now, with rising home prices and with fewer distressed houses on the market, according to data firm RealtyTrac, real estate investing is changing. Across the country, investors are focusing more on flipping higher-end properties that offer larger profits.

In the Washington region, flipping activity dropped by 13 percent from the third quarter of last year to the third quarter of this year. According to RealtyTrac, the average gross profit on a flipped home in the third quarter this year was $71,832, down from $114,991 in the same period last year.

Still, other data suggest that Prince George’s County, where Pierce’s Temple Hills house is located, may be fertile ground for an increase in real estate investing.

Because Maryland has a lengthy process for mediating distressed properties, foreclosure activity has been rising there while declining in states where it already peaked. From September last year to September this year, the number of Maryland foreclosures rose to 4,189 from 1,271, or 230 percent, according to RealtyTrac.

Moreover, the median sales price of $195,000 for a home in Prince George’s is much lower than the median prices in some surrounding jurisdictions: for instance, $415,000 in Montgomery County, $455,000 in Fairfax County and $468,500 in the District.

According to RealEstate Business Intelligence, a subsidiary of Rockville-based multiple-listing service MRIS, all-cash deals make up a bigger percentage of housing sales in Prince George’s County than in neighboring jurisdictions — another possible sign of flipping activity. This year, all-cash deals represented 27.3 percent of sales in Prince George’s, compared with 20.6 percent in the District and 11.4 percent in Fairfax County.

“What makes Prince George’s more appealing to a flipper is you have a lower price point and faster price appreciation,” says Daren Blomquist, vice president of RealtyTrac.

Pierce, a 37-year-old former Marine, entered the real estate business in 2001 and initially concentrated on acquiring rental property. He has been flipping houses for seven years through his company, Snow Goose Homes, based in Woodbridge, Va.

“On my first flip, I lost five grand,” Pierce says. “Most of the loss came from the house sitting on the market too long.”

Pierce found the Temple Hills house by accident as he was attending to another distressed property on the same street. “I was called by a private lender to finish fixing up a house and saw a ‘For Sale’ sign in the front yard,” he says. The property was part of an estate sale and was in danger of being sold at a tax auction; family members were looking for somebody to buy them out of the headache as quickly as possible.

He secured funds from a private investor and paid the family $63,000, which staved off foreclosure. His basic plan was to do a “pop-up,” adding a second story that would double the amount of square-footage.

The plans soon went awry. “I wanted to go straight up, but the county code requires a 25-foot setback for new construction, and the original house was only set back 20 feet,” says Pierce, who chronicled his experiences for The Washington Post’s Where We Live blog. Pierce didn’t know about the code requirement until after he had drawn up plans and submitted them to the county for approval.

To comply with the building code and make up for the loss of living space, Pierce changed the plans by sliding the pop-up away from the street and bumping out the back of the house. Reconfiguring the plans and resubmitting them to the county ate up valuable time, but there were other issues to deal with. “I had problems with the subcontractors,” Pierce says. “The HVAC guy disappeared, and the electrician was showing up only when he wanted to.”

He proposed to extend the rear of the house and support the addition on piers with an open area underneath, an idea that was not well received by readers of the blog. “I got hammered,” Pierce says. “Some of the people commenting on the blog are anti-business and anti-flipping.” Pierce tweaked the plans again and added a “semi-conditioned” storage area under the bump-out to allay concerns about heating and cooling the area above.

He made $85,000 worth of improvements to the property, including new siding, electrical, plumbing and HVAC. A new deck improved the house’s connection to a large back yard that is bordered by a fast-running creek. With the work finished and the paint still drying, he listed the finished house for $239,900.

The money used to finance the project came from a private investor with whom Pierce will split the profits. Sometimes, flippers obtain short-term financing from a small network of “hard money lenders,” who include Brian C. Athey of Congressional Capital.

“We’re able to provide loans in as fast as three days and typically in 10 to 14 days, where a bank may need 30 days to close,” says Athey, 37. Hard money lenders put less importance on a borrower’s personal credit score. They lend money based on a property’s ARV, or “after repair value,” and charge higher rates than a bank would for a typical construction loan.

The basic principle of buying a fixer-upper for a low price and selling an improved home for a much higher price lures many amateurs into the business, including Chris Maio, 47, who works for the Federal Reserve as an electronic-messaging specialist. Maio bought an investment property in Annapolis, where he lives, in June for $295,000, using money from private investors. His plan was to invest $75,000 to $80,000 and list the finished property for $475,000.

Maio has experience working as a general contractor and some design skills, but work on the house has taken longer than expected. His latest goal for completion is Dec. 1. He blames the slow progress on “the unknowns.”

“I had toilets that were slow to flush, so we tried to snake them,” Maio says. The snake didn’t work so Maio dug up the main drain lines, discovered tree roots and then was hit with a “stop work” order because he didn’t have the proper permit to dig. The lesson, he says, was “make sure you have the right people and the proper budget.”

To make their investments pay off, lenders, builders and flippers have to examine a lot of prospects. In the past seven years, Pierce has flipped about 40 houses. According to his calculations, to have any hope of turning a profit, he needs to acquire a property for no more than 70 percent of what it’s worth.

Adding a second story to the Temple Hills house enabled Pierce to remove interior walls and give the home a more modern layout.

The front door, which remains in the same place, opens into a small sitting room big enough for a sofa. In a hallway that leads to the modern kitchen, there hangs a large photo of what the house looked like in the “before” stage. The kitchen has a black granite breakfast bar that’s just right for quick, casual meals. The refrigerator, dishwasher, microwave and stove are all finished in stainless steel. The cabinets are Shaker-style.

The main living area has a ceiling fan and opens onto a small dining room in which closet doors hide the hookups for a washer and dryer. There’s a full bathroom on the first level, with a tiled floor and bathtub. The last room on the first floor could be used as a bedroom or a home office.

All the floors on the first level are hardwood. All the windows in the house have been replaced.

On the carpeted second level are two bedrooms and another full bath, in addition to the master suite, which has its own bathroom and a jumbo closet. All the bathrooms in the house have water-conserving dual-flush toilets.

Now the basement can be reached by way of a carpeted stairway off the kitchen. The space feels open and uncluttered as the new hot water heater, sump pump and furnace are hidden away. The house has ample storage, including the space under the addition, which could be used to store tools needed for maintaining the house and yard.

Even though Pierce is deep into the flipping business — completing five to seven properties a year — he said he has mixed feelings about his career choice.

“Sunday comes up, and you want to do something with your kids, and you discover the contractor is painting the house the wrong color,” he says. “But I do like saying: ‘Look what I did. I took the dumpiest house in the neighborhood and turned it around.’”

Scott Sowers is a freelance writer.