Ted Cruz's re-election bid is going very badly for him — and his increasingly desperate attempts to stay ahead aren't helping.

Republican Sen. Ted Cruz is in serious danger of losing his job — in Texas.

Cruz’s Democratic challenger, Rep. Beto O’Rourke, has been steadily closing the polling gap. Real Clear Politics rates this race — in a state where Republicans have held both Senate seats for nearly two decades — as a “toss-up.”

And none of Cruz’s increasingly desperate tactics have done a thing to help him.

Back in April, Cruz, who has never been particularly well-liked by Texas voters, was still in denial about the possibility that they might fire him.

“I recognize that every two to four years the press and Democrats got very excited about turning Texas blue,” he told Bloomberg News at the time. “But that’s not going to happen this year.”

By August, Cruz was singing a different tune.

At a campaign stop early in the month, he told supporters he was hoping Trump — the man who viciously attacked Cruz’s wife and suggested Cruz’s father was behind the assassination of JFK — would swoop into the state to lend him a hand.

“I would certainly welcome his support, and I hope to see him in Texas,” Cruz said.

Trump’s recent announcement that he would indeed head to Texas in October to help Cruz garnered immediate ridicule for both men, with people across the internet eager to recall the insults Trump and Cruz have exchanged.

Parkland survivor turned activist David Hogg started raising money to put up billboards featuring some of those statements.

Many someones said yes. Within a week, Hogg’s campaign has raised nearly $10,000.

Cruz’s latest desperate tactic — and it’s a doozy — is a ridiculously edited video falsely accusing O’Rourke of calling flag burning “inherently American” and saying he was “grateful” to those who do it.

O’Rourke, of course, did no such thing. What he did do was respond to a question at a campaign stop about whether he thought it was disrespectful for black athletes to kneel during the national anthem in protest of police violence.

“My short answer is no, I don’t think it’s disrespectful,” O’Rourke said. He went on for several minutes to give a powerful and passionate defense of protesting for civil rights.

“Non-violently, peacefully, while the eyes of this country are watching these games, they take a knee to bring our attention and our focus to this problem to ensure that we fix it,” O’Rourke said. “That is why they’re doing it, and I can think of nothing more American than to peacefully stand up, or take a knee, for your rights – anytime, anywhere, any place.”

O’Rourke’s response was widely praised as brave, powerful, and deeply patriotic — and it went insanely viral, garnering more than 44 million views across social media.

Cruz’s response was to mock O’Rourke on Twitter for the outpouring of support from “Hollywood liberals.”

That didn’t work to stop O’Rourke’s momentum, though. So Cruz’s campaign released its own video:

The video then shows a message reading, “Beto O’Rourke was asked his views on burning or desecrating the American flag. This was his answer.” Finally, the video plays O’Rourke saying, “I think that there is something inherently America about that, and so I’m grateful that people are willing to do that.”

The Cruz campaign’s clumsy attempt to falsely portray O’Rourke backfired, with plenty of local and national outlets calling it out for the lie it is.

Instead of making O’Rourke look un-American, Cruz managed to make himself look even more petty and pathetic.

And that was after another failed attempt by Cruz to shake up the race with a negative ad blitz earlier in August that also backfired.

Instead of boosting Cruz’s numbers by accusing O’Rourke of wanting to legalize heroin, Cruz boosted O’Rourke’s already impressive fundraising: $1.3 million in a single weekend.

It is unquestionably a steep hill for any Democrat to beat any Republican in a Texas Senate race. But O’Rourke is running an impressively successful campaign so far, while Cruz keeps flopping and failing. A recent poll from Emerson College shows Cruz ahead by just a single point.

No wonder Cruz has resorted to just plain old outright lying about his opponent. Not that lying will help Cruz. If anything, it will simply give activists and reporters an opportunity remind voters of Cruz’s nickname in 2016, Lyin’ Ted, from none other than his new savior, Trump.