Beto O'Rourke apologized to the staff of his Texas Senate campaign for being a 'giant a**hole' during the competitive, high-pressure 2018 race.

'I just feel very, very lucky, and I love you guys more than you'll ever know,' he told his staff on election night, after it was announced Republican Sen. Ted Cruz had won re-election.

'I know I was a giant a**hole to be around sometimes, and you all never allowed my shortcomings to get in the way of running the best campaign this state has ever seen.'

Beto O'Rourke apologized to the staff of his Texas Senate campaign for being a 'giant a**hole' during the competitive, high-pressure 2018 contest

He made his comments in 'Running with Beto,' a documentary premiering on HBO Tuesday night; it debuted at SXSW in March where O'Rourke attended with his wife Amy and daughter Molly

The scene played out in the documentary 'Running with Beto,' which premieres on HBO on Tuesday evening. The Daily Beast obtained the footage.

O'Rourke offered public praise to his campaign staff at his concession rally in El Paso, Texas, last year, saying he was 'so f****** proud' of them.

'I want to thank this amazing campaign of people,' he said. 'All people all the time, all the time, in every single part of Texas, all of you, showing the country how you do this. I'm so f****** proud of you guys.'

Now the story of his failed Senate bid is coming to TV screens.

'Running with Beto' provides a fly-on-the-wall perspective of O'Rourke's Senate bid, which failed to topple Ted Cruz but made him a national Democratic star and led to his entry into the 2020 presidential contest.

Film makers had unprecedented access to O'Rourke for the documentary - following him on an early morning run and in quieter moments with his wife Amy and three children.

'Running with Beto' made its national debut in March at the South by Southwest film festival in Austin.

During the 90 minute film, O'Rourke is shown occasionally snapping at staffers while lamenting about missing time with his kids as he visits all 254 counties in Texas, according to CNN's review.

The Daily Beast notes O'Rourke is 'charismatic yet controlling' in the documentary but 'its most revealing moments being ones where he is seen dressing down his clearly overworked staff for their perceived lack of preparedness.'

O'Rourke came within three points of toppling Cruz and raised a record $80 million for his Senate bid.

His campaign became famous for live streaming its events - a move O'Rourke tried replicate on the presidential campaign trail to lesser success.

The Washington Post's review notes the documentary feels 'outdated and already archival' given O'Rourke's current standing in the 2020 Democratic field.

His star faded rapidly on the campaign trial, as former Vice President Joe Biden entered the race and South Bend Mayor Pete Buttigieg caught fire.

A series of early gaffs did not help. He was criticized for his announcement video, which featured his wife Amy sitting silently by his side.

Beto O'Rourke with his wife Amy on election night 2018

Molly O'Rourke, Beto O'Rourke, Nancy Schafer, Greg Kwedar, David Modigliani, Rebecca Feferman, Rachel Ecklund, and Arianne Ribeiro attend the 'Running with Beto' premiere at SXSW in March

And his early time on the campaign trail ended up becoming an apology tour.

His 2020 announcement was timed with his debut on the cover of Vanity Fair. But it was a quote in the piece that garnered him the wrong kind of attention: 'I want to be in it. Man, I'm just born to be in it.'

He apologized for quote - which was criticized for being condescending and reeking of male privilege.

But he had to apologize again a short time later for telling a crowd in Iowa his wife is 'is raising, sometimes with my help,' their three kids.

In-depth looks at his career - which saw him working as a part-time nanny in New York before returning to El Paso to work in his mom's furniture store, play in a band, and start a failed newspaper before he successfully ran for city council and the Congress.

He got a reputation for 'failing up.'

Beto O'Rourke is in the process of rebooting his presidential campaign

O'Rourke sits in sixth place in RealClearPolitics' polling average on the primary battle.

He's been pushing for a campaign reboot.

He's done more national interviews, including appearing on ABC's 'The View' and taking part in a town hall on CNN in Iowa. And he made his first Sunday show appearance as a presidential candidate Sunday on CBS' 'Face the Nation.'

He's also the subject of an extensive profile in The New Yorker this month.

His staff points to his work ethic: as of mid-May, O'Rourke has driven more than 6,000 miles, through 14 states, held more than a 150 town-hall meetings, visited 32 college campuses, and answered more than 1,000 questions.

O'Rourke said his shaky campaign start was on him.

'It has not gone as well as I would have wanted it to, in terms of my performance with the press,' he told The New Yorker. 'That's on me, a hundred per cent.'

He also said he was talking about adding a speech writer to his campaign.

'I don't think I've ever read a speech,' he said. 'I've definitely never looked at a teleprompter.'

He told the magazine he loves talking to people on the campaign trail but dislikes media interviews.

'The town halls, the issues, the travel, the endurance, I love all that,' O'Rourke said, adding what he didn't love was 'the thirty members of the press, in your face, at the first event, at the second event, at the third, and then day after day after day, and asking almost nothing about anything that we just experienced together in that room, in that coffee shop or that tavern or in that home, but things that may have been popping up on the news that day.'