(Adds analyst comment, updates prices, adds context)
ISTANBUL, Aug 2 (Reuters) - Turkey's lira tumbled to a record low beyond 5 to the dollar on Thursday, after Washington imposed sanctions on two of President Tayyip Erdogan's ministers over the trial of a U.S. pastor accused of backing terrorism.
The sell-off, which also hit local stocks and Turkey's debt risk profile, reflected deepening investor concern over longstanding tensions with the United States, a NATO ally and major trading partner.
The White House announced sanctions against Justice Minister Abdulhamit Gul and Interior Minister Suleyman Soylu. It has blamed both men for involvement in the arrest and detention of Andrew Brunson, an evangelical Christian pastor from North Carolina who has lived in Turkey for more than two decades.
Brunson is charged with supporting the group Ankara blames for orchestrating an attempted coup in 2016. He denies the charges but faces up to 35 years in jail.
"As long as these issues remain and especially if they escalate, the capital flows outlook for Turkey would be negatively affected," said Inan Demir, senior emerging market economist at Nomura.
"If the Turkish response is a measured one, there might be room for a measured relief. But without more visible steps to deescalate, the medium- to longer-term path for the lira would be weakness again."
The local currency hit a record low of 5.0924 to the dollar, recovering marginally to trade at 5.0800 by 0822 GMT.
The cost of insuring Turkey's debt against default spiked to the highest in more than six years, while the BIST 100 share index fell more than 2 percent, with banking stocks among the decliners.
The lira has lost a fifth of its value this year, battered by rising inflation and concerns over the central bank's independence in the face of repeated calls by Erdogan for lower interest rates.
Turkey's Foreign Ministry said it would retaliate against what it called Washington's "hostile" action. "We call on the U.S. administration to walk back from this wrong decision," it said in a statement on Wednesday.
Relations between the United States and Turkey have plummeted over Brunson, who was in custody for 21 months in a Turkish prison until he was transferred to house arrest last week.
On Tuesday a court rejected his appeal to be released from house arrest during his trial on terrorism charges.
The NATO allies are also at odds over the Syrian war, Turkey's plan to buy missile defences from Russia and the U.S. conviction of a Turkish state bank executive on Iran sanctions-busting charges this year.
But Brunson's case has resonated with U.S. President Donald Trump and more particularly with Vice President Mike Pence. Pence, who has close ties to the evangelical Christian community, has been following proceedings since Brunson was arrested and pressing behind the scenes for action, aides said.
Brunson was accused of helping supporters of Fethullah Gulen, the U.S.-based cleric who Turkish authorities say masterminded the 2016 coup attempt against Erdogan in which 250 people were killed. He was also charged with supporting outlawed PKK Kurdish militants.
Turkey has been trying for two years to have Gulen extradited from the United States. (Additional reporting by Humeyra Pamuk in Istanbul and Karin Strohecker in London Editing by Dominic Evans and John Stonestreet)