Harry Styles and Beto O'Rourke posed together backstage after the singer endorsed the Texas Democratic gubernatorial candidate during his concert on Sunday night.

O'Rourke, 50, took to Twitter to share a photo of the two that was taken after the 28-year-old British pop star performed at the Moody Center in Austin, Texas.

"Thanks, Harry!" O'Rourke captioned the image that he posted on Tuesday.

harry styles beto o'rourke

Harry Styles and Beto O'Rourke posed together backstage after the singer endorsed the Texas Democratic gubernatorial candidate during his concert. (Getty)

O'Rourke is running against incumbent Republican Governor Greg Abbott, 64.

HARRY STYLES ENDORSES TEXAS GUBERNATORIAL CANDIDATE BETO O'ROURKE DURING CONCERT IN AUSTIN

During his concert, Styles displayed a "Beto for Texas" sticker on his guitar. The former One Direction member pointed to the logo and a close-up of the sticker was screened on the jumbotron. 

The jumbotron then displayed O'Rourke, who was seen clapping and smiling in the middle of the cheering crowd. In videos posted by fans, the politician was also seen walking around the arena and high-fiving concert-goers. 

Sunday night's performance marked the fifth concert of Styles' residency at the Moody Center, which concluded with his sixth show on Monday night.

According to Austin television station KVUE, the "Adore You" hitmaker spoke out about abortion rights, gun control and voter registration during each of his Texas shows.

Following the May 24 mass shooting at Robb Elementary School in Uvalde, Texas, Styles announced that he was partnering with the gun control non-profit Everytown for America for the North American leg of his Love On Tour. 

On Monday, the Moody Center's official Instagram account wrote, "In honor of the 100,000 fans that attended our 6 night sold out @harrystyles residency, $100,000 has been donated to @everytown."

The "Don't Worry Darling" star endorsed President Joe Biden in the 2020 U.S. presidential election. 

beto o'rourke willie nelson

Ahead of Styles' concert, O'Rourke was endorsed by Willie Nelson during a "Vote ‘Em Out" campaign rally in South Austin. O'Rourke and Nelson are pictured in 2018. (Photo by Gary Miller/Getty Images for ABA)

Republican National Committee spokeswoman Macarena Martinez responded to Styles endorsement in a statement. She said, "Beto has shown Texans that his priority is cozying up to coastal elites and celebrities. We’ll see in a few short weeks how many are left standing around him when he loses for the third time in November." 

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Ahead of Styles' concert, O'Rourke was endorsed by Willie Nelson during a "Vote ‘Em Out" campaign rally in South Austin. 

Nelson took the stage wearing an O'Rourke t-shirt and performed several songs, including "Vote Em Out", a song that the Grammy Award winner debuted at an O'Rourke campaign rally during the 2018 Senate election in Texas.

O'Rourke, who ran as the Democratic challenger to incumbent Republican senator Ted Cruz, ultimately lost the election.

CLICK HERE TO GET THE FOX NEWS APP