In a thinly veiled attack, the Republican Party's presumptive presidential nominee, Mitt Romney, suggested on Monday the U.S. military would be weakened if President Barack Obama gets his way on budgetary matters.

Romney was speaking to a crowd of about 5,000 in San Diego during what was described not as a campaign event but as a Memorial Day tribute.

We have two courses we can follow, Romney said at the Veterans Museum and Memorial Center, ABC News reported.

One is to follow the pathway of Europe. To shrink our military smaller and smaller to pay for our social needs. And they of course rely on the strength of America, and they hope for the best. Were we to follow that kind of course, there would be no one that could stand to protect us, Romney said.

The other is to commit to preserve America as the strongest military in the world, second to none, with no comparable power anywhere in the world, Romney said. We choose that course. We choose that course for America not just so that we can win wars, but so we can prevent wars. Because a strong America is the best deterrent to war that ever has been invented.

Romney did not mention Obama by name in his remarks. However, the president this year called for cutting almost $600 billion in military spending and earmarking the savings to pay for improvements in the country's transportation system, as reported by the New York Times.

Romney said the U.S. faces many potential national-security threats. He contended that Iran is rushing to become a nuclear nation and that, should it acquire such weapons, it would be simply unthinkable if they wound up in the hands of terrorist organizations such as Hezbollah or Hamas.

I wish I could tell you that the world is a safe place today, Romney said. It's not.

In addition to Iran and terrorist organizations, Romney cited China, Russia, Venezuelan President Hugo Chavez, and Mexican drug cartels as other sources of concern in terms of U.S. security.

San Diego is noted for its high concentration of military personnel, with the city's military population hovering around 175,000 residents if you include family members of servicemen, according to NBC San Diego.

The city also has strong Republican leanings and a Gallup poll released Monday showed Romney with a 24-point lead over Obama among veterans, 58 percent to 34 percent. The president had a slight edge over Romney among nonveterans, 48 percent to 44 percent. The race is tied at 46 percent apiece when all registered voters are taken into account.

Romney praised the country's military servicemen and -women for their sacrifice as he asked them to stand so they could be applauded.

Greatness in a people I believe is measured by the extent to which they will give themselves to something bigger than themselves, Romney said. To sacrifice for a cause of significance. And when that sacrifice of self, and for purpose and for principle greater than self, surpasses our everyday understanding by the widest margin, we call that greatness heroic. We are a nation that has been formed and preserved by heroes.

Before his remarks, Romney joined his former rival, 2008 Republican presidential nominee and U.S. Sen. John McCain. R-Ariz., in laying a wreath to pay tribute to the country's fallen military personnel.

McCain, a prisoner of war for more than five years during the Vietnam War who endorsed Romney last month, hailed the former Massachusetts governor as being fully qualified to be commander-in-chief.

McCain said, He believes in American exceptionalism, according to CNN. He believes that the 21st century will also be an American century. And I am confident of his leadership, and I know of his support for veterans and their families.