President Obama and Malia leave Marine One at Los Angeles International Airport en route to San Francisco last month. (Nick Ut/AP)

As he walked to Air Force One, President Obama draped his arm around his daughter Malia’s back. She accompanied him on a recent trip to Chicago and Los Angeles, and he seemed giddy to have her along, smiling broadly as they walked through drizzling rain.

With Malia’s high school graduation just a month away, Obama has grown wistful. The 17-year-old will be moving on — maybe soon. The White House said Sunday that she will enter Harvard in fall 2017 after taking a gap year. Someone familiar with her thinking said Malia has made no decision about what she will do during those months.

“Probably the thing I’m most proud of is, mainly as the assistant to Michelle Obama, I’ve raised two daughters who are amazing and I’m really, really proud of,” he told a group of college reporters visiting the White House last month. “And being able to do that while still focused on my job I think is something I’ll look back on and appreciate.”

The White House announced that eldest daughter Malia Obama will attend Harvard University after taking a gap year. (Thomas Johnson/The Washington Post)

Sending a child out into the world is a pivotal moment for any parent. For the Obamas, the arc of Malia’s childhood has coincided with the arc of Barack Obama’s presidency. Malia came into the White House as a fifth-grader with her hair in twists. Now she is about 6 feet tall and lithe, with fashion magazines following her clothing choices.

“She’s got her own mind,” the president said at a town-hall event last year, admitting to getting weepy on the first day of her senior year at Sidwell Friends School.

Fatherhood has been a central passion of the president’s. He was reared without his own father and was often absent when his daughters were very young as he campaigned for office, commuted to his job as an Illinois state legislator and later flew between Chicago and Washington as a U.S. senator. After being elected president, Obama spoke often of his excitement at living full time under the same roof with his family. The end of that season has been especially tough on him.

“I imagine watching Malia go off to college will be as emotional — if not more emotional — than the moment he leaves the White House next year,” said Joshua DuBois, a former assistant to Obama who became the president's friend and a spiritual adviser. “The first lady may have to squeeze his hand extra tight.”

Realizing that neither Malia nor Sasha, 14, had attended a White House state dinner, their mother included them on the guest list for the recent soiree honoring Canada. The teens donned ball gowns and gawked at the celebrities in attendance, but their dad got misty. During his toast to Prime Minister Justin Trudeau, Obama had to stop himself when he began to talk about Malia.

“When I was first elected to this office, Malia was 10. And Sasha was just 7. And they grow up too fast. This fall, Malia heads off to college,” he said. “And I’m starting to choke up, so I’m going to wind down and say my remarks. I can’t do it; it’s hard.”

Obama has called Malia one of his best friends; she and Sasha have been among the people with whom he can talk about his work. Around the family dinner table most nights at 6:30, he listened to stories about middle-school friendships and shared his on-the-job challenges. Sometimes, his daughters took an interest.

Malia Obama at the state dinner for Canada in March. (Joshua Roberts/Reuters)

Malia, who has been described by her parents as bookish and lawyerly, came to her father during an early crisis of his presidency. As oil began spilling into the Gulf of Mexico, dominating headlines and confounding experts trying to stop the environmental disaster, Malia peeked her head into her father’s bathroom door as he was shaving one morning and asked, “Did you plug the hole yet, Daddy?”

The president has credited conversations with his daughters for his decision to support gay marriage. The Obamas encouraged both of their daughters to take an interest in political and policy issues that dovetailed with the girls’ own concerns, but they were careful not to force their involvement, DuBois said. Malia sat in on the president’s meeting with Malala Yousafzai, the now-18-year-old Pakistani activist who has advocated for girls’ education.

Malia has also influenced the president’s take on popular culture. He has described himself as sensitive to the messages conveyed by images of women of color in the media and the challenges of those beauty standards for black women, in part because of conversations with his daughter.

“Malia’ll talk about black girls’ hair. . . . She’s pretty opinionated about the fact that it costs a lot, it takes a long time, that sometimes girls can be just as tough on each other about how they’re supposed to look,” Obama said during a conversation about race with ballerina Misty Copeland set up by Time magazine.

When it came to her search for a college, Obama had hoped Malia would opt for an experience outside of her current orbit. In taking a gap year before enrolling in Harvard, where both of her parents went to law school, Malia may be following her father’s advice.

“The whole point is for you to push yourself out of your comfort level, meet people you haven’t met before, take classes that you hadn’t thought of before,” Obama told a group of high school students last year when relaying advice he had given his daughter. “Stretch yourself. Because this is the time to do it, when you’re young. Seek out new experiences.”

Obama’s daughters have had a unique childhood. They are among the youngest to have grown up in the White House in modern times. Amy Carter was 9 when her parents moved into the White House, and Chelsea Clinton was 12. Both drew a fair amount of attention, but interest in the Obama girls was intensified by an increasingly ravenous media climate and their historic role as the first black children to grow up in the White House. By delaying her college enrollment for a year, Malia may escape some of the media coverage that follows a sitting president’s family.

The Obamas tried to keep their daughters out of the limelight and give them the space to be kids, said Anita Dunn, who advised Obama during the 2008 campaign and later served as his White House communications director. “It was one of the cardinal rules of the campaign, and the few times we transgressed those rules we got the message and never did it again,” Dunn said.

The Obamas took pains to protect their daughters’ images and, to some extent, curate it. The first lady warned her daughters from a young age about the risk of “bratty” moments being caught on video and going viral, she has acknowledged in interviews. It never happened in video form, but both Malia and her sister were photographed rolling their eyes while enduring their father’s corny jokes during the annual White House turkey pardoning.

Sasha, left, and Malia with their father at the November 2015 turkey pardoning. (Gary Cameron/Reuters)

Mostly, the world saw a steady stream of sanctioned images, sent out by the White House photographers, of a seemingly idyllic family life. The media mainly glimpsed their childhoods — and Malia’s burgeoning adulthood — from a distance.

At 1600 Pennsylvania Ave., the little girl to whom the president read Harry Potter got braces, and later shed them. She reportedly started dating, which was cause for her father to joke to comedian Steve Harvey that he’s “got men with guns following them around all the time” to scare off any sketchy boyfriends.

She went to prom. “I think it’s fair to say the first time you see your daughter in heels, it’s a bit jarring,” the president said at the time. Last year, Secret Service members taught Malia to drive. The president has said she wants to be a filmmaker.

This Easter, the Obama family attended church services at Alfred Street Baptist Church in Alexandria, Va., and the Rev. Howard-John Wesley got a good look at Sasha and Malia, who had last visited the church with their parents in 2015.

“Seeing them two years in a row, I was amazed at how much they’ve grown,” Wesley said. “They are imposing figures just like their mother.”

Malia, left, and Sasha joined their parents to greet Pope Francis at Joint Base Andrews in Maryland in September 2015. (Andrew Harnik/AP)

Michelle, Sasha and Malia Obama examine the Terracotta Warriors in Xian, China, in March 2015. (Peter Parks/AFP/Getty Images)

White House aides describe Malia as smart, although they weren’t specific about her grades. At the private Sidwell Friends, she played varsity tennis, attended school dances, developed friendships. During school breaks, she traveled with her parents to several continents and met heads of state, including private audiences with world leaders such as President Xi Jinping of China and Nelson Mandela of South Africa.

In recent summers, Malia pursued her interest in showbiz, interning in New York last year on the set of the racy HBO comedy-drama “Girls”; creator Lena Dunham, an avid Democratic campaigner who has praised Malia as “elegant,” hired her after her dad let it slip in an interview with the New Yorker that his daughter was a fan. The year before, Malia was a production assistant in Hollywood on the CBS sci-fi thriller “Extant,” where she made coffee runs.

Next year, her mom and dad could be moving her into a dorm in Cambridge. The Clintons both traveled to California to help Chelsea settle in at Stanford before her father’s term ended, recalled Lisa Caputo, who was press secretary for Hillary Clinton when Chelsea left for college.

“The goal is to enable the student to have as normal an experience as possible,” Caputo said. “It’s a partnership between the academic institution and the family.”

Obama may be steeling himself for Malia’s eventual move to campus and, before that, her gap year, but he acknowledged to Ellen DeGeneres in an interview this winter that his daughter has no such qualms: “She’s ready,” he said.

Alice Crites contributed to this report.