In the remote northern Maine city of Caribou, residents watched with pride Friday as a hometown hero made history in an even more out-of-the-way place: outer space.
Jessica Meir, the first woman from the state to go to space, emerged from the hatch of the International Space Station at 7:38 a.m. Friday, joining fellow NASA astronaut Christina Koch in the first all-female spacewalk in history, NASA said in a statement. The agency livestreamed the hourslong spacewalk.
At Caribou Middle School, where Meir was once a student, it was more than just a science lesson, said Leland Caron, the principal.
“For [students] to see and witness what Jessica has done then and where she is now, there are some kids that are so inspired,” Caron said. “Not just some young ladies in our building, but young men as well, know that if they work hard, they can reach their dream.”
Vaughn McLaughlin, the band director at the Caribou School Department, taught Meir from fifth grade through high school. He said he was nervous about the spacewalk, which happened 250 miles above Earth.
“I always get nervous for her safety,” McLaughlin said. “When you have a kid that long, they become one of your own. I’m really glad for her, but I’ll be just as glad when she’s back down and grounded.”
McLaughlin said Meir brought a piccolo to space. He said Meir had wanted to be an astronaut since she was in elementary school.
“It’s a fabulous thing when you see kids having that kind of success,” McLaughlin said. “No matter where you’re from — we’re about as remote as you’re going to get — if you’re driven to do something, you can do it. She’s really proven that.”
Meir’s childhood friend, Erin Umphrey, went to Kazakhstan when Meir blasted off from there Sept. 25, Umphrey said.
“I’ve been glued to the live feed in between work commitments,” Umphrey said in an e-mail to the Globe. “I have been watching with such excitement at what my sweet friend has accomplished today with confidence, skill, and incredible poise. I am unbelievably proud of her.”
President Trump spoke to Meir and Koch in a phone call during their spacewalk Friday afternoon.
“We are thrilled to be speaking live with two brave American astronauts who are making history. This is the first time for a woman outside of the space station,” Trump said. “I just want to congratulate you. What you do is incredible. You’re very brave people. I don’t think I want to do that.”
The astronauts quickly clarified that this was the first ever all-female spacewalk, but women have left the station before.
“We hope that we can provide an inspiration to everybody, not only women, that has a dream, has a big dream, and is willing to work hard to make that dream come true,” Meir said in the phone call. “It is a pretty incredible feeling, I’m sure you can all imagine, and it’s one that I will never forget.”
Spacewalking is widely considered the most dangerous assignment in orbit. Italian astronaut Luca Parmitano, who operated the station’s robot arm from inside during Friday’s spacewalk, almost drowned in 2013 when his helmet flooded with water from his suit’s cooling system.
The astronauts Friday replaced a broken part of the space station’s power grid, using wrenches, screwdrivers, and power-grip tools.
America’s first female spacewalker from 35 years ago, Kathy Sullivan, was delighted. She said it’s good to finally have enough women in the astronaut corps and trained for spacewalking for this to happen.
‘‘We’ve got qualified women running the control, running space centers, commanding the station, commanding spaceships, and doing spacewalks,’’ Sullivan told The Associated Press earlier this week. ‘‘And golly, gee whiz, every now and then there’s more than one woman in the same place.’’