Washington (AFP) - Hours before polls closed in one of America's most closely watched Senate races pop superstar Beyonce lent her support to Beto O'Rourke, the Texas Democratic candidate hoping to unseat Republican Ted Cruz.

Beyonce, a Houston native, posted a series of self-portraits that showed her sporting a cap with the slogan "Beto for Senate" and the message: "Every vote counts."

"Every race matters," the queen of pop wrote. "We can't voice our frustrations and complain about what's wrong without voting and exercising our power to make it right."

"We need you."

O'Rourke -- a charismatic three-time congressman and former punk band member -- tweeted his thanks to Beyonce, who in the past has thrown her star power behind Barack Obama and presidential hopeful Hillary Clinton.

The high-profile 11th hour endorsement came as American voters were pouring into polling stations to wrap a heated midterm campaign seen as a test of Donald Trump's contentious presidency.

O'Rourke's battle against Ted Cruz -- a 47-year-old who fought Trump for the 2016 Republican presidential nomination -- is one of the most expensive and closely watched Senate races in the sharply divided United States.

A win from the 46-year-old O'Rourke -- whose given names are Robert Francis but who goes by Beto -- would post a major win for the embattled Democratic Party.

Beyonce was a last-minute addition to the list of stars backing O'Rourke, who also garnered support from Houston hip-hop artist Travis Scott and NBA royalty LeBron James.

"Sending you all love and positivity on this happy voting day!" Beyonce wrote.