U.S. President Donald Trump greets the crowd as he arrives for his "Make America Great Again" rally in Billings, Montana U.S., September 6, 2018. REUTERS/Kevin Lamarque

BILLINGS, Mont. (Reuters) - President Donald Trump said on Thursday a possible shutdown of the U.S. government over border wall funding “most likely” would not happen until after the November congressional elections.

In an interview with Fox News, Trump said he had been persuaded that closing the government would hurt his fellow Republican candidates.

Trump has repeatedly threatened to shut down the government when funding runs out on Sept. 30 if the U.S. Congress does not include enough money for a wall on the border with Mexico.

He walked back that threat in the interview, which was conducted prior to a Montana rally and will be broadcast on Friday.

“Most likely I will not do that. But we are going to do it immediately after the election,” Trump said.

“If it were up to me I would shut down the government over border security,” he said. “But I don’t want to do anything that is going to hurt us or potentially hurt us because I’ve got a feeling that Republicans are going to do really well in the midterms.”

Republican control of the House of Representatives and Senate is at stake in the Nov. 6 elections, which are seen as a referendum on Trump.

He campaigned heavily on a promise to build a wall that would be paid for by Mexico, which it has refused to do. Trump has subsequently turned to Congress to seek $25 billion for the project, along with other immigration demands.

Trump and U.S. lawmakers averted a government shutdown in March after passing a massive $1.3 trillion spending bill to fund the government through Sept. 30.