After spending the summer threatening to shut down the government if Congress doesn't give him billions of dollars to build a border wall, President Trump is now declaring he thinks a shutdown is good politics for him.

That's despite the fact nearly everyone else in his party disagrees.

Republicans control all of Washington, and if the government shuts down at the end of this month when the fiscal year ends, it would come just weeks before most members of Congress face voters. Republican leaders have a hard time imagining a more nightmarish scenario for their party: The government has already shut down briefly twice this year under their watch, and the Republicans' majority is on the line this November in the House of Representatives and maybe even the Senate.

Yet Trump doesn't seem to care much. Each time he appears to assuage Republican leaders' concerns by moderating his position, he says something a day or two later more strongly in favor of a shutdown.

Here's everything Trump has said about the potential for a shutdown. What Trump ultimately does will decide whether the government shuts down this month — and, potentially, Republicans' fate in the midterms.

July 29: “I would be willing to 'shut down' government if the Democrats do not give us the votes for Border Security, which includes the Wall! Must get rid of Lottery, Catch & Release etc. and finally go to system of Immigration based on MERIT! We need great people coming into our Country!” — on Twitter

July 30: " If we don’t get border security after many, many years of talk within the United States, I would have no problem doing a shutdown.” In a joint news conference with the Italian prime minister

July 31: “I don’t care what the political ramifications are, our immigration laws and border security have been a complete and total disaster for decades, and there is no way that the Democrats will allow it to be fixed without a government shutdown.” — On Twitter

Aug. 1: “I happen to think it’s a great political thing, because people want great border security,” he said, adding “It's the right thing to do.” — An interview with conservative radio commentator Rush Limbaugh

Aug. 2: “We're either getting it or we're closing down the government. We need border security.” — At a rally in Pennsylvania

President Trump suggested that Republicans would trigger a government shutdown if border security funding was not approved on Aug. 2 in Wilkes-Barre, Pa. (The Washington Post)

Aug. 20: “We're building the wall, step by step, and it's not easy because we have a little opposition called the Democrats,” Trump said while speaking at an immigration event at the White House. Trump said he wants $5 billion this fiscal year for a border wall, despite being told by Republican leaders that's more than Congress is willing to give him now.

Sept. 4: “I don’t like the idea of shutdowns. ... I don’t see even myself or anybody else closing down the country right now,” Trump said in an interview with the Daily Caller, though he allowed that a shutdown could be much more likely after the midterm elections.

Sept. 5: “If it happens, it happens. If it's about border security, I'm willing to do anything.” — Trump said this with the two Republican congressional leaders sitting by his side, as they prepared to convince the president to avoid just that.

Sept. 6: “Most likely I will not” shut down the government, he said. " . . . I guess when you get right down to it, it is up to me. But I don’t want to do anything that’s going to hurt us or potentially hurt us.” — Fox News interview

Sept. 6: “Build that wall! Build that wall! Build that wall! Build that wall! Build that wall! Build that wall! Build that wall! Build that wall!” — Trump supporters at a rally in Montana, a cry that The Washington Post's Damian Paletta, Erica Werner and Josh Dawsey report is getting harder for Trump to ignore as he closes in on his second year as president without delivering on this campaign promise.

Sept. 7: “I would do it because I think it’s a great political issue.” To reporters aboard Air Force One