LONDON — Until quite recently, Zamira Hajiyeva was living the high life, according to British authorities. She had a $14.5 million townhouse in London’s tony Knightsbridge neighborhood, a golf club in the English countryside and a gold-plated shopping habit at Harrods.

That was before a British court this year asked the 55-year-old from Azerbaijan an impertinent question: How did she afford those purchases?

That query is at the heart of a bold British push to try to reverse what the government believes is a flood of foreign investment stemming from overseas corruption and criminality.

For more than a decade, ultrarich people from the former Soviet Union, China and the Middle East have turned to London mansions, New York high-rises, and chic properties in Vancouver, Miami and Paris to store their cash. The phenomenon has turned the real estate markets of North American and European cities into the savings accounts of wealthy foreigners – some of whom face allegations of corruption or crime back home.

Regulators on both sides of the Atlantic have failed to stem the tide, which has helped drive property prices beyond the reach of some local residents and, critics argue, facilitated illicit conduct overseas. Now a new investigative tool being launched by British authorities could serve as a powerful deterrent. But it forces wealthy individuals to demonstrate that they bought property with lawfully earned funds – a departure from legal precedent that required the state to prove the use of illicit money.

“It is quite a dramatic move to put a burden on somebody to explain the legitimacy of their income, versus the reverse burden, which would normally be on the state to show income or property had been unlawfully obtained. We have issues about that,” said Jonathan Fisher, a lawyer specializing in white-collar-crime cases.

The case involving Hajiyeva – whose husband is serving a prison sentence in Azerbaijan for embezzlement – is the first of what the government says will be several efforts to deploy the new “unexplained wealth orders” in the coming months.

Under new legislation, law enforcement agencies can seek the orders from a court when they have “reasonable grounds to suspect” that a person lacks enough legal income to explain a large purchase – and has ties to a foreign public official or possible links to crime. If recipients of the orders can’t show that they used legitimate income, the court may allow the government to seize the property.

Donald Toon, head of economic and cybercrime at the National Crime Agency, which requested the court orders against Hajiyeva, said the government is enforcing the law that Parliament passed. Britain needed an easier way to target suspected dirty money arriving from overseas, he said, because it’s often hard to acquire firm evidence of criminality in foreign countries with unreliable legal systems.

“It cannot be right that, in our view, people are able to acquire and retain property and hold assets in the U.K. where we have a reason for belief that that represents the proceeds of criminal behavior,” Toon said in an interview at the agency’s South London headquarters. The National Crime Agency plans to ask the High Court for “a handful” of additional orders in the next few months, he said. “The aim is to make it easier to remove dirty money from the system.”

That’s a goal other Western countries are pursuing, with mixed results. The United States, for one, is strong at investigating and prosecuting money laundering, but it has “serious gaps” in regulation of the lawyers, accountants and real estate agents who help clients launder money, knowingly or unknowingly, according to David Lewis, executive secretary of the Financial Action Task Force, an intergovernmental body that combats illicit finance.

The United Nations has estimated that criminal funds equal to about 2.7 percent of global gross domestic product may be laundered through the financial system annually. Unexplained wealth orders are a relatively new tool for attacking the problem, though they have been used in a handful of countries, including Australia. In Britain, judges will issue them only if authorities can show that the recipient has suspected ties to crime or to a public official in a non-European country – a position that could enable them to benefit from corruption without sufficient legal scrutiny, lawyers say.

Hajiyeva is married to Jahangir Hajiyev, who in 2016 was convicted of embezzling money from a state-controlled bank in Azerbaijan. London’s High Court issued an unexplained wealth order to Hajiyeva in February, asking her to explain the purchase of the London townhouse. A second order involved the golf club.

Hajiyeva argued in court that it was her husband’s responsibility to purchase the property, and that she had no knowledge about the payments or the source of the money, court records show. The High Court rejected her attempt to have the first order quashed, saying it was issued on solid grounds.

Hajiyeva has not been charged with a crime in Britain – the unexplained wealth order is a civil investigative tool.

Her home country of Azerbaijan, however, charged her with embezzlement in 2016, saying she worked with her husband to defraud the bank. According to her lawyers, Hajiyeva believes “that the proceedings against her husband were abusive and politically motivated” and that Azerbaijan’s charges against her “are similarly tainted.”

In late October, acting on an extradition request from Azerbaijan, Britain arrested Hajiyeva and jailed her for nine days before releasing her on bail while the courts consider the extradition request. In mid-November, reporting to a London police station in a chauffeured SUV for her daily check-in – a condition of her bail, along with wearing an electronic tracking device and abiding by a curfew – Hajiyeva declined to comment to The Washington Post on her legal troubles.

London’s rich culture and nightlife and posh boarding schools have made it a magnet for overseas capital, bringing a flood of wealthy foreigners seeking a comfortable life away from their sometimes turbulent home countries.

Foreign money particularly streamed to London after the fall of the Soviet Union in 1991, when privatization of state-owned industries, often through corrupt auctions, created a new generation of millionaires and billionaires. Buyers from former Soviet republics helped drive London housing prices to record highs, causing consternation among Britons who were priced out of the market.