Sarah Palin has offered unsolicited advice to US President Barack Obama on containing Russian aggression, saying “the only thing that stops a bad guy with a nuke is a good guy with a nuke”.

The Republican former vice presidential candidate used a predominantly crass tone throughout her appearance at the Conservative Political Action Conference.

But she hit home by attacking what she called a feckless Obama foreign policy that she said has helped embolden Russian President Vladimir Putin.

Failing to show peace through strength has allowed some “very, very, very bad dudes (to) gain ground”, said Palin, who remains a darling of the far-right.

Obama “would gut our arsenal while he allows others — enemies — to enrich theirs”, she said.

“Mr President, the only thing that stops a bad guy with a nuke is a good guy with a nuke.” The comments follow Russia's invasion of neighbouring Ukraine last month, action which sent tensions soaring and US-Russia relations to perhaps their lowest point since the end of the Cold War.

The remark may have sounded flippant, but it was red meat to conservatives mindful of similar language used by the head of the National Rifle Association, America's largest gun lobby.

In the aftermath of a December 2012 mass shooting in Connecticut, NRA executive vice president Wayne LaPierre poured fuel on the gun control debate by saying that “the only thing that stops a bad guy with a gun is a good guy with a gun”.