The economic crisis poses "a threat to the security" of Spain and the armed forces must maintain the military capability to defend the national interests, King Juan Carlos said in an address Sunday.
The monarch made his call for defending the national interests in his first address of the year, traditionally delivered on the celebration of the Pascua Militar.
The king thanked the members of the three branches of the armed forces and the Civil Guard for their service.
"As loyal servants of the state, we should contribute, with an even greater effort, if possible, to the task of helping this great nation move forward with effort, generosity and a spirit of sacrifice," the king said.
The address at the Royal Palace in Madrid was the king's first public appearance outside his residence in the Zarzuela Palace since Dec. 23, when he had hip surgery.
Queen Sofia, Crown Prince Felipe and his wife, Princess Letizia, Prime Minister Mariano Rajoy and other officials attended the ceremony.
The tradition of celebrating the Pascua Militar dates to the 18th century, when King Carlos III congratulated the Spanish troops that defeated British forces on Jan. 6, 1782, and took Port Mahon, the capital of the Mediterranean island of Minorca.