So much for Swiss neutrality.

An agency overseen by the Swiss foreign ministry made a hefty donation to the Clinton Foundation — at the same time the US and Switzerland were in the midst of a diplomatic struggle over tax evasion.

The Swiss Agency for Development and Cooperation shelled out about $500,000 to the Clinton Foundation in 2011, money earmarked for a program that sought to lower mortality for mothers and infants in Liberia, the Schweiz am Sonntag newspaper discovered on Sunday, according to The Local.

The payment was made when the US government was pressuring Swiss banks to hand over customer info, after allegations arose that Swiss banks were being used to help avoid US taxes.

Hillary Clinton was secretary of state at the time of the donation — and, after leaving the State Department, she went on to join the board of the Clinton Foundation.

A person speaking on behalf of the Swiss Agency for Development and Cooperation told the site there was “no hidden agenda” for the donation and that it wasn’t made “for political ends.”

“From now on we must check that money is being well invested,” socialist politician Carlo Sommaruga told Le Tribune de Genève, calling the payment a “political error.”

But socialist politician Manuel Tornare disagreed. “This donation was doubtless unwise, but I nevertheless find it hard to believe that it’s possible to ‘buy’ the US for [$500,000].”

Clinton’s ties to her family foundation — and accusations of pay-to-play — plagued her throughout her unsuccessful presidential bid.