Beto O’Rourke, the Democrat challenging GOP Sen. Ted Cruz in the midterm elections, is being slammed by Republicans for saying there is “nothing more American” than kneeling during the national anthem.

“Comments like his are a slap in the face to every man and woman who has ever served our nation and put their lives on the line to defend American values,” Republican Party of Texas Chairman James Dickey said Thursday.

O’Rourke, a Democratic congressman, was asked at a recent campaign event about NFL players who kneel during the anthem. O’Rourke replied, “I can think of nothing more American than to peacefully stand up, or take a knee for your rights anytime, anywhere, any place.”

While Republicans decried the remark, liberals are celebrating it.

“His answer was perfect,” said the liberal news site NowThis, which posted video of the exchange.

Actor Kevin Bacon tweeted his thanks to O’Rourke. And basketball star LeBron James saluted O’Rourke for his “candid thoughtful words!”

Cruz, the conservative senator elected in 2012, has hit back on the campaign trail.

“When Beto O’Rourke says he can’t think of anything more American, well I got to admit, I can,” Cruz said during a recent stop in Corpus Christi, referencing American soldiers, sailors, airmen and Marines who salute the flag.

He is also drawing attention to the praise O'Rourke has gotten from Hollywood celebs.

“Most Texans stand for the flag, but Hollywood liberals are so excited that Beto is siding with NFL players protesting the national anthem that Kevin Bacon just retweeted it,” Cruz said.

It comes as O’Rourke – who has benefited from favorable national media attention, sympathetic magazine profiles and comparisons to the Kennedys – is gaining ground on Cruz in polls.

A NBC News/Marist Poll released this week shows Cruz ahead of O’Rourke by just 4 points, with 49 percent support to O'Rourke's 45 percent.