The Democratic presidential contest entered a unique phase today that could be called the Mexican photo opportunity.

Sen. Edward M. Kennedy and his wife Joan brought the American campaign south of the border for some personal diplomacy with Mexico's president and a series of colorful media events -- mass at the nation's holiest shrine, a visit to the president's Rose Garden -- during a 20-hour tour of the world's largest Hispanic city.

Among the Mexican people, at least, the trip was a political tour de force.

The city's media outlets gave the visitor, the best known American politician here, prodigious coverage, as big crowds lined the streets to chant "Arriba Kennaydee -- el proximo presidente!"

Unfortunately for Kennedy, nobody in those cheering crowds can cast votes that would make him the next U.S. president. Still, it was pursuit of Hispanic votes that prompted the candidate to choose this weekend as the time to accept an eight-month-old invitation from Mexico President Jose Lopez Portillo.

Kennedy has concluded that Hispanic political power can be an important asset for his campaign in the Southwest. Campaign aides say that concentrated Hispanic support was a key element in Kennedy's upset victory in Arizona's caucuses last month, and they hope for more Hispanic help in Texas' caucuses Saturday and the California primary on June 3.

And so the Kennedy camp decided that media coverage of a Mexican tour might be useful. The Mexican television stations, which broadcast by cable to hundreds of thousands of Hispanic Americans in south Texas, were more than accommodating. Everywhere the Kennedy's went they were surrounded by a buzzing media swarm.

The senator's visit here was formally described as Senate business; the candidate officially came here to talk with Lopez Portillo in his status as chairman of the Senate Judiciary Committee, which deals with immigration matters.

But nobody in the Kennedy entourage tried to deny that the trip was political. And when Kennedy arrived today at Los Pinos, the Mexican White House, the president's official schedule listed the visitors not as a committee chairman but as a "candidado por la presidencia."

After his hour-long, closed-door meeting with Lopez Portillo, Kennedy gave a speech on Mexican-American relations to a group of business and political leaders. He noted that his late brother, President John F. Kennedy, had proposed his "Alliance for Progress" in Mexico City 18 years ago. Today, Kennedy proposed a new cooperative effort to be called the "accord for justice."

Everywhere he went, Kennedy was surrounded by a team of Secret Service agents and their Mexican counterparts, the Federales. "We like working with these Federales," said one Secret Serviceman with the lightest touch of envy in his voice. "They have supreme power here."