TOKYO — The handwritten note was short, just three sentences long.
But it had a profound effect on Ayaka Shiomura, a legislator in Tokyo who had been taunted publicly by male colleagues for speaking out about the problems of working mothers in Japan.
“We never know when our actions will have the greatest impact,” Caroline Kennedy, the US ambassador to Japan, wrote, “and it’s often not when we expect.”
That note two years ago, Shiomura recalled, “really helped me.” It lifted her from a depression over the criticism she faced from political rivals and on social media and inspired her to continue to fight for women’s rights. Months later, at a reception at the ambassador’s residence for female leaders, Kennedy greeted her with raised fists and told her, “Don’t let these troubles get you down.”
In many moments like these, Kennedy, who will depart Japan next Wednesday after three years here, sought to convey to women across the country a quiet message of empowerment.
Dozens of American envoys will leave office next week, but few of them are as prominent as Kennedy, the daughter of President John F. Kennedy. Over the last three years, she helped manage relations with one of America’s most important allies, but her status as the first woman to hold the post may have been just as consequential for traditionally male-dominated Japan.
“I just think being a woman ambassador, and I think visible women in positions of leadership, does help change attitudes,” Kennedy said in an interview this month in her office at the US Embassy in Tokyo.
The historic nature of Kennedy’s tenure is evident in an alcove down the hall from her office, where 30 portraits of past US ambassadors hang in three neat rows. Going all the way back to Townsend Harris, the first envoy to Japan in 1856, they are all men.
In Japan, where few women hold positions of authority and married women cannot use their original surnames, Kennedy, a trained lawyer and mother of three, was a role model for combining power and family as well as a vital supporter of the agenda of Prime Minister Shinzo Abe, who has said he wants women to play a larger role in business and politics.
Her influence as ambassador stemmed from who she was — not just a woman, but the daughter of President Kennedy, a beloved figure here as he is in the United States.
Among skeptics, her celebrity raised questions about her fitness for the job. She had no formal diplomatic experience before moving to Japan in late 2013, nor did she have special expertise in Japan.
A 2015 report by the Office of Inspector General highlighted Kennedy’s unfamiliarity with “leading and managing an institution the size of the US Mission to Japan” and criticized a lack of communication within the embassy. On the campaign trail, President-elect Donald Trump mocked Kennedy, claiming “she’ll do anything they want, anything!” in reference to the Japanese government.
But those who have worked with her say she leveraged the good will associated with her family name — as well as her close ties to President Obama — to build strong relationships with people in the Japanese government, business community and broader public.
“She transformed herself from a celebrity into an influential public figure and statesman who became trusted, respected, liked and listened to,” said Daniel R. Russel, assistant secretary at the Bureau of East Asian and Pacific Affairs in the State Department.
Kennedy won public appreciation as she traveled across the country, visiting 35 of 47 prefectures. She rode in bicycle races in the Tohoku region devastated by the 2011 earthquake and tsunami, and showed a playful side when she appeared in a Santa hat in a wildly popular video (more than 6 million views and counting) mimicking dance moves from a popular Japanese television series.
When talking at conferences about women’s equality, one of her favorite causes, Kennedy did not hector her audiences, said Kathy Matsui, chief Japan equity strategist at Goldman Sachs in Tokyo and an adviser to Abe on women’s issues.
“She always talked about the history of women’s empowerment in the United States, which wasn’t always a stellar track record either, to say how far everybody has come,” Matsui said.
Kennedy acknowledged the slow pace of change in Japan on such practical matters as insufficient day care slots and labor law reform. “I don’t blame people for being frustrated,” she said. “But I feel that there is a real commitment here.”
While Japan has been one of America’s strongest allies since the end of World War II, Abe is a conservative, nationalist leader of the Liberal Democratic Party that has traditionally felt more aligned with Republicans in Washington.
“One of the things that she did behind the scenes was to make sure there was greater connectivity between these two ideologically opposed governments,” said Michael J. Green, a former Asia adviser to President George W. Bush and now at the Center for Strategic and International Studies.
Trump has not officially announced a new ambassador, but some news organizations have reported that William Hagerty, a Tennessee businessman, will be nominated. Kennedy, who once flirted with running for the US Senate, will return to New York. Aides say she has no fixed plans, although they expect she will remain interested in Japan.
Trump has spooked some here with comments about trade and complaints about US military costs in Japan. Kennedy said the alliance between the two countries would remain strong.
“If I’ve learned anything,” she said, “it’s that this relationship is bigger than any one person.”
During her time as ambassador, Kennedy’s Japanese counterparts viewed her as someone who would listen to their perspective but fight hard for US interests.
“I think most people don’t know about this, but Ambassador Kennedy was an exceptionally tough negotiator,” Fumio Kishida, Japan’s minister for foreign affairs, wrote in an email. “When I could persuade her, I could persuade Washington, D.C., as well. On the contrary, when she gave me a firm negative response, I thought it was time for the Japanese side to come up with an alternative idea.”
Advisers to Abe showed her drafts of important speeches, including the prime minister’s speech on the 70th anniversary of the end of the war and his remarks at Pearl Harbor last month.
Kennedy said she pointed out what American audiences “might be listening for,” particularly when talking about wartime history.
It was in the area of historical reconciliation that Ms. Kennedy exerted her biggest sway. She played a central role in pushing for and organizing Obama’s historic visit to Hiroshima last May.
“She was relentless,” said Ben Rhodes, the deputy national security adviser, who said Kennedy emailed him about the visit “multiple times a week for months.”
As for many American ambassadors in Japan, one of Kennedy’s biggest challenges came in dealing with the complex dynamics of Okinawa, which hosts nearly half of the roughly 50,000 US troops in Japan.
In December, Kennedy presided over a ceremony in which the United States officially returned nearly 10,000 acres of land in Okinawa to Japan. The handover upset some residents because the Japanese government agreed to build six new helicopter landing pads on the acres that the United States retained to use in jungle warfare training.
Some residents in Okinawa said they had hoped Kennedy would be more sympathetic to protesters who want the US military to greatly reduce its footprint.
“We had a hope when she was appointed as the US ambassador to Japan, as a daughter of the symbol of democracy,” said Tomohiro Yara, a freelance writer and activist in Okinawa. “Sorry, the symbol was only a symbol.”
Kennedy said she understood the anger. “You may not hear it, but I think that certainly we did take actual practical steps,” she said, including the return of other land on Okinawa and moving an aircraft hangar to reduce noise. “So hopefully people will see that the US is committed to making progress, reducing our presence.”