But the disagreement over Cuba has threatened to wash away any growing good will. At issue is Spanish Foreign Minister Miguel Angel Moratinos's decision to snub Cuban dissidents on a visit to Havana in April, a move that irritated Washington.
Moratinos has defended the move, saying engagement with Cuba is the best policy.
"There is a major transition coming in Cuba, and I think democratic states have an obligation to act democratically," Rice said before touching down in Madrid, alluding to the lingering health problems of 80-year-old Cuban President Fidel Castro.
She said Western democracies must not "give the regime the idea that it is just going to be transitioned from one dictatorship to another."
Spanish Prime Minister Jose Luis Rodriguez Zapatero has said he would be glad to discuss Spain's position on Cuba with Rice, and hoped his explanation would assuage U.S. concerns.
"Countries and governments don't have to have equal visions on every aspect of international policy," Zapatero said earlier this week. "But it is positive that we are talking about it. Surely, when we talk our positions will become more understandable."
But Zapatero's office has also downplayed the significance of his meeting with Rice, saying it would be brief and characterizing it as a "courtesy call."
Rice arrived just after midday, and was heading to a meeting with Spanish King Juan Carlos before talks and a working lunch with Moratinos, the foreign minister. She planned to meet with Zapatero in the afternoon, followed by the head of Spain's conservative opposition, before departing.
Her visit was the first by a senior U.S. official in three years, and Rice was candid when asked why it had been so long.
"There is no secret that we have had differences with Spain on a number of issues, but we have also had very good cooperation with Spain on a number of issues," she said aboard the plane.
Zapatero is one of the few European leaders not to have been invited to the White House since taking office, and he did not help his chances when he openly supported Democratic challenger John Kerry on the eve of the U.S. elections in 2004.
In fact, relations between Zapatero and Washington have been frosty since even before he took power.
In 2003, as head of the Socialist Party then in opposition, Zapatero declined to join other Spanish officials in standing up when U.S. troops marched past a VIP stand during a parade to mark National Day. The next year, as prime minister, he did not even invite the Americans.
That followed Zapatero's decision to withdraw Spanish troops from Iraq, which he did a month after taking office in 2004. The war has been deeply unpopular here, particularly after a terror attack by Islamic militants that killed 191 people on Madrid commuter trains. The militants said they targeted Spain because of its participation in the peacekeeping force in Iraq.
Rice said Washington was most upset about how the withdrawal of Spanish troops was handled.
The U.S. objection was "not that they exited Iraq, but how they exited Iraq," she said.
Despite the open fissures, Spanish and U.S. officials say relations have never been as bad as the media has made out, and point to frequent ministerial-level contacts between the two countries. Trade figures show the political chill has not extended to business.
A spokeswoman for Zapatero told The Associated Press that Spain and the United States share the same goal for Cuba, and only disagree on how to get there.
"On what is essential for Cuba we agree - to achieve democracy - but we differ on strategies," she said on customary condition of anonymity.
When General Wesley Clark spoke about the famous list of seven Middle Eastern countries to be demolished in five consecutive years, he has done nothing but remark, for the last time, if there was any need, Washington's willingness to redesign the Middle East within a more general framework of global domination.