The eviction from their million-dollar home could come at any moment. Keith and Janet Ritter have been bracing for it — and battling against it — almost from the moment they moved into the five-bedroom, 4,900-square-foot manse along the Potomac River in Fort Washington.

In five years, they have never made a mortgage payment, a fact that amazes even the most seasoned veterans of the foreclosure crisis.

The Ritters have kept the sheriff at bay by repeatedly filing for bankruptcy and by exploiting changes in Maryland’s laws designed to help delinquent homeowners avoid foreclosure.

Those efforts to protect homeowners have transformed Maryland’s foreclosure process from one of the country’s shortest to one of the longest. It now takes on average 634 days to complete a foreclosure in Maryland, compared with 132 days in Virginia.

Champions of Maryland’s system, including Gov. Martin O’Malley (D), credit it with driving down the state’s foreclosure rate and helping thousands of victims of predatory lending, fraud and other abuses hang on to their homes.

“The market won’t fix itself,” said Anne Norton, Maryland’s deputy commissioner for financial regulations. “By the time it does, how many homeowners will be churned up and spit out by the machine?”

Critics, including economists and lenders, blame the state’s go-slow approach for a growing backlog of foreclosures and a weak-to-nonexistent recovery in home prices. To them, the system puts too much emphasis on helping individual homeowners and not enough on quickly clearing the market of foreclosures so prices can rebound and hard-hit communities can recover. And they say it also creates opportunities for abuse by those determined to drag the process out for as long as possible.

“How is it people can stay in a house for five years without ever making a mortgage payment?” said Thomas A. Lawler, a former senior vice president at Fannie Mae who now runs his own consulting firm in Loudoun County. “That’s a screwed-up process. It’s an example of how the process is broken.”

The Ritters, who bought their house for $1.29 million with almost no money down, are hardly representative of the vast majority of Maryland’s distressed homeowners.

During the boom, they set out to become mini real estate moguls, buying properties and flipping them for a profit. In the process, Keith Ritter, 54, went from being on probation for bankruptcy fraud and making minimum wage to being a successful real estate investor and landlord with a six-figure income. Then, when the housing market tanked five years ago, the couple found themselves facing multiple foreclosures.

The Ritters have tried to negotiate different payment arrangements with their lender to save their posh home near National Harbor, they said, but to no avail.

“It was never our intention to get here and never make a mortgage payment,” Keith Ritter said. “We don’t believe in living for free.”

But he and Janet, a 51-year-old real estate agent, make no apology for using every tactic available to them to stay in their house, including challenging the foreclosure sale in court, requesting mediation and claiming they had a tenant living with them. Their adversaries, they argued, are giant financial institutions with armies of lawyers that are out to make as much money as possible at the expense of homeowners.

“When a bank does all it can to save itself, that’s good business,” Keith said. “When a homeowner does the same thing, he’s called a deadbeat.”

Reprieve after reprieve

For a guy who has lost much of his wealth and is on the verge of getting booted from his home, Keith Ritter is oddly calm. He says things such as, “No matter what happens, we are at peace” and likes to quote Scripture.

He and Janet pray daily, read the Bible, attend Pentecostal services and are reliable tithers. Their faith fuels their hope that they can somehow stave off eviction. But they also keep the sheriff’s office on speed dial. Keith calls the number every few days, always with the same question: “Do you have a date for us yet?”

By now, he recognizes the voices that answer the phone at the sheriff’s office. They keep the conversation brief.

No, nothing yet. Another reprieve.

Ritter’s composure in the face of eviction may be due to the fact that he has survived worse. A native of Detroit, he settled in the Washington area after college and started a successful company cleaning commercial buildings. Through his business, he got interested in real estate.

“I saw real estate as the way to wealth,” Ritter said.

By the 1990s, he was buying up properties in Northern Virginia, and he quickly learned that making money in real estate can be harder than it looks.

“I made a lot of mistakes,” he said.

According to federal prosecutors and court records, Ritter bought real estate and then put the properties in the names of family members. When he fell behind on mortgage payments, he filed for bankruptcy protection in his relatives’ names in various jurisdictions to stop foreclosure proceedings. Then he tried to get the bankruptcy filings dismissed without telling the mortgage lenders. He pleaded guilty in 2000 to bankruptcy fraud and was sentenced to 15 months in federal prison in Petersburg, Va., where he wrote the first of three books about his deepening faith, “Life From the Inside.”

“I’ve always loved God,” Ritter said. “I haven’t always obeyed God, but I’ve always loved him.”

When he got out of prison, he spent two years on probation, working at a Sears to pay $10,000 in court-ordered restitution.

By the time his probation ended in 2004, the housing boom was underway. He and Janet settled in Fort Washington, an affluent, fast-growing community south of the Beltway.

The Ritters started out in a $360,000, 2,300-square-foot house with a circular driveway and a pool. As its value skyrocketed, the couple borrowed against it to buy other properties in Fort Washington that they would fix up and then sell. They were convinced that National Harbor, a massive planned hotel, retail and convention center complex, would raise home values.

At one point, they owned seven properties. In 2004, the run-up in prices was so steep that the Ritters grossed more than $200,000 in six months, off two deals. In 2006, they made close to that amount with a single sale.

The couple, who have no children, began driving Mercedes-Benz sedans and taking trips to Europe and the Middle East. They also donated $6,000 to a church in Springfield, court records show.

Ritter said he began to worry in 2006, when a few deals started falling through because the buyers could not get financing. He started looking into buying a restaurant, where he could showcase his wife’s cooking. Then a real estate agent friend came by, saying, “I’ve got a house for you.”

The custom-built property, on three-quarters of an acre on Riverview Road, was a showstopper, with Palladian windows, high ceilings and a gabled roof. Inside, French patio doors led to a magnificent sunroom. The dining room had red walls, a tray ceiling and a chandelier the original owner had brought back from Prague. Upstairs, the master bedroom had a sitting area and a three-way fireplace. The windows surrounding the tub in the master bath offered incredible views of the Potomac. And the house next door had sold for $1.7 million.

The Ritters were not sure they could afford the million-dollar-plus price tag until they were approved by Realty Mortgage Corp., a now-defunct Mississippi lender, for $1 million. Another lender covered the down payment.

The couple called their new residence “God’s house” because, as Keith Ritter put it, “that’s the only way we could have been approved for a loan.”

They did not get to revel in their good fortune for long. By the time they moved in at the end of 2006, home prices had begun their disastrous free fall.

The housing crash

The market soured with ferocious speed. Between 2006 and 2008, housing prices in Prince George’s County fell 17 percent while the number of properties in foreclosure surged from 3,094 to 32,338, according to a state report. Housing counselors went from seeing one homeowner behind on a mortgage a week to seeing 10 a day.

For the Ritters, the housing crash was a catastrophe. The couple still owned five properties, four of which they had rented out.

But falling home values meant they could not refinance the mortgages, some of which carried adjustable rates. Pretty soon the rents they were charging were not covering the mortgages. Janet Ritter’s sales commissions started to dry up, along with other sources of income. By the time the first mortgage payment of almost $7,600 on the Riverview Road house was due in January 2007, they faced a decision: which properties to save.

“Do we put the money we had left in this one? Or is it better to spread it to the others?” Keith Ritter recalled wondering.

They chose the latter course, expecting to be able to catch up on the Riverview Road payments later. But that didn’t happen.

The first foreclosure against the Riverview Road house was filed in 2007. By that time, Realty Mortgage no longer owned their loan, which would change hands at least two more times. The foreclosure case was brought by lawyers representing Mortgage Electronic Registration Systems, or MERS, the controversial electronic mortgage registry that some lenders used as a proxy to initiate foreclosures. But the proceedings ground to a halt the next year after Janet Ritter filed for bankruptcy protection. The bankruptcy case was later dismissed at her request.

Meanwhile, the couple’s rental properties and previous residence, which they had held on to, were also facing foreclosure.

In 2009, the year foreclosure proceedings began on their old house on Clay Drive, Keith Ritter filed for bankruptcy twice. Both bankruptcy cases were later dismissed, but they managed to disrupt the foreclosure of the Clay Drive home three separate times. The property was even sold on the courthouse steps in Upper Marlboro in spring 2010. However, a county circuit court judge later declared the sale invalid because the bankruptcy case was still active when the sale took place.

Ritter defended his tactics.

“Anytime anyone tries to take your home,” he said, “you are going to use the legal system to save it.”

Only they didn’t save it. In 2010, the Riverview Road house went into foreclosure for the second time shortly after Kondaur Capital, a California company that buys and services troubled home loans, purchased the note from Morgan Stanley.

Talks with Kondaur began. The Ritters initially agreed to a short sale, with a starting sales price of $1 million that was later dropped to $799,000. The house did not get any takers.

At different times, the couple said, they offered to make payments, but they said Kondaur turned them down, preferring to foreclose. Kondaur did not return calls and e-mails asking for comment. The company’s attorney, Robert Hillman, also declined to discuss the case.

The Ritters then asked for a remedy that had just been approved by Maryland lawmakers to help distressed homeowners: mediation.

“Defendant(s), humbly prays that the Honorable Judge, will recognize that this process, written into law by Governor O’Malley was to prevent just this situation, whereby the note holder can . . . trample on the rights of the homeowner,” Keith Ritter wrote in a December 2010 mediation request.

When the mediation day arrived in April, however, the Ritters were not there. They later said that, because of a mailing address mix-up, they never got the necessary paperwork. They complained that they were denied mediation, but Prince George’s Circuit Court Judge Thomas P. Smith ordered the house sold.

Janet Ritter filed for bankruptcy, this time in Georgia, where the couple owned another house that was later lost to foreclosure. The foreclosure on the Riverview Road house was stopped again until that bankruptcy was dismissed, too. The house finally went on the auction block in July, and Kondaur bought it back for $552,500, a common industry practice.

The Ritters immediately challenged the sale in court. Judge Smith ratified the sale. The couple then said they had a tenant living with them, potentially triggering recently passed state and federal laws that prohibit tenants from being tossed out when their landlords are foreclosed on. Kondaur’s attorneys again demanded possession of the house, usually the last step before eviction. A hearing was set for mid-December.

The day of the hearing, the hallway outside the courtroom buzzed with speculation that the couple in the million-dollar home had finally reached the end of the road.

Hillman, the Kondaur attorney, arrived first. As he placed his briefcase on the plaintiff’s table, he said to the few people seated inside the courtroom, “It’s old me — the underdog.”

The Ritters arrived soon after to represent themselves. The tenant, whom the judge had ordered to appear, was a no-show.

Janet Ritter argued that Kondaur had no right to foreclose, because it could not prove it owned the note on the house. She said some of the paperwork documenting the mortgage’s many transfers from one pool of mortgages to another was fraudulent because it had been “robosigned,” a legacy of hasty processing during the boom in which foreclosure-mill employees signed thousands of documents without reading them. Such errors have been sufficient to halt foreclosures in other states. And widespread evidence of robosigning led to a recent $25 billion settlement with several major banks on behalf of hundreds of thousands of homeowners. But in Maryland, the courts have ruled that if the lender can provide records of a note’s history, and how it came to possess it, it has the right to foreclose, even if the records weren’t properly endorsed.

In response to Janet Ritter’s argument, Hillman held up an original copy of the note, with Keith Ritter’s signature in blue ink.

Judge Smith awarded Kondaur possession of the property. Two days later, Kondaur filed for eviction. The Ritters knew it was only a matter of time before the sheriff showed up at their door to deliver it.

A long-shot hope

On a rainy Wednesday in February, Keith Ritter stood in front of a foreclosed brick house a few miles from his home on Riverview Road. On the garage door, the county had posted a notice that said the property needed to be cleaned.

Ritter, dressed in jeans, a knit cap and a jacket, had come to clear the house as part of his new business, Beat It Movers, which cleans and maintains foreclosed homes so they can be sold. Ritter gets the irony of working for some of the same banks that have foreclosed on him. But he has to make money somehow.

“All I know is real estate,” he said.

The job took only 30 minutes. Afterward, Ritter decided to stop at another house nearby that he and Janet bought in 2006. It was also in foreclosure, although it had not been auctioned yet.

The tenant had moved out about two months earlier, and the house was empty except for a leather sectional just off the kitchen. The beeping sound of smoke detectors with dead batteries pierced the air at regular intervals. Ritter and the other men went inside to bring out the couch.

Being able to clear out your own house is a luxury, and far better than the alternative. Ritter dreads coming home to Riverview Road to find his belongings — the fine furniture and framed artwork, his wife’s designer shoes — spread out on the front lawn.

“People think, because you haven’t paid, you must be a bad person. But not everything is black and white,” Ritter said. “A lot of things happen between the lines.”

Ritter still thinks he can work something out to save his house. He is trying to persuade an investor to buy the house from Kondaur and then sell it back to them. It’s a long shot, and Ritter said he has been praying a lot. In January, he fasted for 30 days “for spiritual cleansing and guidance,” he said.

He has found solace in his Bible, especially a passage from Matthew that he has bracketed in black ink from the parable of the unforgiving servant.

“At this the servant fell on his knees before him,” the passage reads. “ ‘Be patient with me,’ he begged, ‘and I will pay back everything.’ ”

Staff researchers Jennifer Jenkins and Magda Jean-Louis contributed to this report.