Sen. James Inhofe (R-Okla.) went after his fellow GOP Sen. John McCain (Ariz.) as the latter faced reelection Tuesday.

Inhofe, rated as one of the most conservative members of the upper chamber, attacked McCain's conservative credentials and said he only gets elected because of his opposition to earmarks.

The Tulsa World wrote that Inhofe "attacked" McCain as a "closet liberal," then quoted Inhofe as saying he "gets elected because of one thing — earmarks."

It is rare to see senators from the same party criticize one another directly, especially in an election year.

McCain faces a primary challenge from former Rep. J.D. Hayworth (R-Ariz.), who is running to his right. But the 2008 GOP presidential nominee is expected to win the race handily Tuesday night.

Hayworth and McCain's opponents on the right have criticized the long-time senator for changing his positions on policies such as immigration and climate change, noting that he previously negotiated with Democrats on major pieces of legislation. 

The senior Oklahoma senator is the ranking Republican on the Senate Environment and Public Works Committee and is a climate-change skeptic.

Inhofe spoke at the Tulsa Metro Chamber on Tuesday morning.