MEXICO CITY — When Margarita Zavala, the wife of Mexico’s president, is reminded that newspapers here all ran front-page photographs of her attending a recent memorial service for two university students killed in drug violence, she frowns just slightly.
In the past few months, this discreet first lady has taken on a public role consoling the families of victims as Mexico’s drug war claims a growing number of innocent lives. But she had not planned for her expressions of solidarity, as she called them — the phone calls, the unpublicized visits — to become so visible.
“I don’t like to do it in a very public way because it is something very personal,” she said Wednesday in an interview in her study. “I think it’s really important, for somebody, for a mother to feel that she is not alone.”
Ms. Zavala got even more exposure last week when she hosted Michelle Obama, who made a lightning trip here on her first solo foreign visit.
Speaking to high school and university students, Mrs. Obama departed only once from her prepared text — to praise Ms. Zavala. “She is smart, she is tough, she is passionate,” Mrs. Obama said of her host. Later, Mrs. Obama told reporters that Ms. Zavala had given her a very informative presentation during an early-morning discussion that the two had held about preventing drug addiction.
Before she became Mexico’s first lady more than three years ago, Ms. Zavala, 42, had a career as a lawyer and then as a member of Mexico’s Congress. The daughter of lawyers, educated at a Catholic school and then one of the country’s most prestigious law schools, she was a rising figure in the conservative National Action Party, where she met her husband, Felipe Calderón.
But when he became president more than three years ago, she slipped quietly into her new role, one that she said she had to make up as she went along.
In part, it was because she had three young children — the youngest is only 7 now — and wanted to make life as normal as possible for them. She still teaches a law course for the high school seniors at the children’s school, the same one she attended. She said she had to explain what it meant for “their daddy to be on loan to the country for six years.”
But she was also aware that her predecessor, who had presidential aspirations, had been a polarizing figure. Political tensions were high after Mr. Calderón won a close election in 2006 that split the country, and Ms. Zavala did not want to cause any controversy, said Sara Sefchovich, a professor at the National Autonomous University of Mexico who has written about Mexico’s first ladies.
While she has worked to raise the profile of women in her party and is an advocate for women’s rights in the workplace, one traditionally feminist argument has never swayed her: she opposes abortion. Her only political declaration since Mr. Calderón has taken office has been to condemn the legalization of abortion in Mexico City.
Other than that stance, Ms. Zavala has pursued her signature themes, supporting organizations that fight drug addiction and others that care for migrant children who are returned alone from the United States.
Even critics of Mr. Calderón’s policies praise Ms. Zavala’s warmth and open-mindedness. As a legislator, “she was sensitive, she was reflective, she liked to listen to the arguments of other women,” said Guadalupe Loaeza, a social commentator who has met Ms. Zavala. A poll released Monday in the Excelsior newspaper found that Ms. Zavala was the most popular politician in her party, ahead of her husband, his cabinet and congressional leaders.
Whether Ms. Zavala has had a role in persuading Mr. Calderón to pay more attention to the social causes of Mexico’s violence is unclear, but she has been at his side as he has begun to change some of the combative statements that characterized the first years of the battle he waged against drug cartels.
When the mother of two high school students who were killed at a party in the border city of Ciudad Juárez confronted Mr. Calderón in February, Ms. Zavala was there, too, listening intently as the distraught woman spoke.
She has visited the neighborhood where the killings took place, residents said, and she has followed up with calls to make sure that the victims and their families are receiving psychological and medical help.
“This terrible moment in the drug war fell on her, and consoling people comes genuinely from deep inside her,” Ms. Sefchovich said.
When asked whether she might have political ambitions beyond her husband’s presidency after it ends in 2012, she is quick to draw back from any suggestion of it other than to say that she promises to continue working to prevent drug addiction. “I have always thought about politics in its broadest sense, in the sense of promoting well-being,” she said. “That doesn’t depend on the position one is in.”