(CNN) – Rudy Giuliani is taking sides in the contentious Republican Senate primary battle in Kentucky.
The former New York City mayor and 2008 GOP presidential candidate announced Monday that he is endorsing Kentucky Secretary of State Trey Grayson, according to the Grayson campaign.
Grayson is involved in a pitched battle with Rand Paul, a physician and the son of former GOP presidential candidate and Texas Rep. Ron Paul, for their party's nomination.
Both are trying to succeed Sen. Jim Bunning, the Republican lawmaker who announced last summer that he would not run for a third term. National GOP leaders rallied around Grayson at the time, but Paul, a favorite with conservatives and with many in the Tea Party movement, has picked up steam and some polls indicate that he leads Grayson in the GOP primary matchup.
"Trey Grayson is the candidate in this race who will make the right decisions necessary to keep America safe and prevent more attacks on our homeland," Giuliani said in a statement. "He is not part of the 'blame America first' crowd that wants to bestow the rights of U.S. citizens on terrorists and point fingers at America for somehow causing 9/11."
Last month, Grayson released a television commercial in which the narrator hit Paul over his opposition to the Patriot Act, before saying that "Paul even wonders whether 9/11 was [America's] fault."
The ad then shows a clip of Paul discussing foreign policy in 2009. "Maybe some of the bad things that happen are a reaction to our presence in some of these countries," Paul says.
The Paul campaign responded with its own commercial calling out Grayson's ad as unfair, saying that a "desperate Trey Grayson is using September 11th to attack my integrity and my patriotism. Trey Grayson, your shameful TV ad is a lie, and it dishonors you."
Bunning endorsed Paul last week. Former Alaska Gov. Sarah Palin, a darling of the Tea Party movement, is also backing Paul. Kentucky's primary is May 18.
State Attorney General Jack Conway and Lt. Gov. Don Mongiardo are the top two candidates battling for the Democratic Senate nomination.
Follow Paul Steinhauser on Twitter: @psteinhausercnn