ISTANBUL (Reuters) - Six U.S. senators introduced bipartisan legislation on Thursday to restrict loans from international financial institutions to Turkey “until the Turkish government ends the unjust detention of U.S. citizens”, a senate committee statement said.

The move followed a Turkish court decision on Wednesday to keep U.S. pastor Andrew Brunson in jail during his trial on terrorism and spying charges, a case that has deepened a rift with NATO ally Washington.

The bill, dubbed the Turkey International Financial Institutions Act, directs the U.S. executive of the World Bank and European Bank for Reconstruction and Development (EBRD) to oppose future loans, except for humanitarian purposes, to Turkey, the Senate Committee on Foreign Relations statement said.

It said the opposition should continue until Turkey is “no longer arbitrarily detaining or denying freedom of movement to United States citizens (including dual citizens) or locally employed staff members of the United States mission to Turkey.”

Brunson, a Christian pastor from North Carolina who has lived in Turkey for more than two decades, was indicted on charges of helping the group that Ankara blames for a failed 2016 coup against President Tayyip Erdogan, as well as supporting outlawed PKK Kurdish militants.

Brunson, who denies the charges, faces up to 35 years in jail if found guilty.

Of the development banks cited in the bill, the EBRD invests the most in Turkey, its biggest lending market. The United States is the EBRD’s biggest shareholder. Last year the bank invested 1.5 billion euros ($1.76 billion) in Turkey.

“The EBRD has had no indication from shareholder governments that they would join the United States in calling for the development bank to stop lending in Turkey,” a bank source told Reuters in London on condition of anonymity.

The United States and Turkey have been formal military allies since Turkey joined the North Atlantic Treaty Organization in 1952.

($1 = 0.8543 euros)