Ola Kamara’s rise to the top of the MLS scoring list can be traced to three key factors: what he was doing at Audi Field in the offseason, whom D.C. United hired as its head coach and how his outlook changed after he visited his newborn son in the ICU this summer.

The Norwegian striker has 16 goals in 19 matches — including 12 in his past dozen appearances — and an unblemished record from the penalty spot.

He will enter Saturday’s home game against FC Cincinnati two goals ahead of Seattle’s Raúl Ruidíaz for MLS’s Golden Boot, awarded to the highest scorer and last won by a D.C. player 10 years ago.

“When [strikers] get going, usually it’s a few games,” teammate Paul Arriola said. “For Ola, it’s been really the whole year.”

Kamara is two goals shy of equaling his personal high in a 15-year career that began in Oslo and has taken him to Germany, Austria, central Ohio, Southern California, China and Buzzard Point. Last season he scored four goals for a losing D.C. team, a level of production that didn’t sit well with him or the club and threw into question whether, at 31, he had a future in Washington.

The issues were both physical and mental.

“I didn’t like the player I was at that time,” Kamara said.

His body never felt quite right last year, he said, and he knew he needed to improve his strength and fitness. Vacation was canceled.

“I was in the basement for four months,” he said, nodding to the south end of Audi Field, which houses the team’s fitness center. “I did nothing else. I stayed here. I trained and trained.”

That, along with embracing a pescatarian diet, was the starting point. He also needed to adjust his attitude, he said, after he had become too content in his return to MLS late in the 2019 season. (Between 2016 and 2018, he scored 48 goals in 90 matches for the Columbus Crew and Los Angeles Galaxy before a brief and forgettable stint with Chinese club Shenzhen.)

“At my age, you just want to be comfortable,” he said. “I came back to MLS, a league I know, to a good city for my family. Before, I would push. Now I wanted the comfort in life. … When you’re too comfortable, you’re almost dead.”

The second key moment came in January, when United appointed Hernán Losada as Ben Olsen’s replacement. On the surface, the coaching change promised to benefit Kamara and the attack immensely. After years in Olsen’s measured system, United would use an aggressive style designed to increase scoring opportunities.

The more Kamara learned about the Argentine coach, though, the more he grew concerned. Losada’s preferred formation — three defenders, two wing backs and two or three midfielders supplying the forwards instead of four defenders and at least three midfielders — had not worked for him at other clubs.

“I thought, ‘Oh, no, here we go again,’ ” Kamara said. “And then I looked at myself in the mirror and said: ‘Ola, what if you are the problem? You’re not doing what you’re supposed to do, and that’s why it happens.’ ”

The attitude shift, he said, “started to get me to push myself. Are you going to accept you’re not good in this formation, or are you going to develop?”

Kamara embraced the movement, positioning and work rate that Losada required. He was on the right path in the preseason until a groin injury sidelined him for six weeks. He missed the first three matches, but in his season debut, he scored against Columbus, the first of four consecutive appearances as a sub.

In his first start, he scored twice against Inter Miami, then in the next game, he added another goal against Miami. On July 3, Kamara scored in a 7-1 blowout against Toronto FC — United’s final game before a two-week break and before his wife, Sandra, was to give birth to their second son.

The pregnancy had gone well, and Kenzo was born July 14. Doctors, though, were concerned enough about several issues to admit him to the newborn intensive care unit.

The couple had gone through something similar 5½ years ago when their elder son, Willian, had complications, though less serious.

“We thought it would be a day, but it turned into seven days,” he said of Kenzo’s ICU stay. “You think about the scenarios because he was so vulnerable. There are wires and monitors everywhere. You are constantly scared.”

Kamara missed a few practices and skipped United’s match July 17 at Philadelphia. A few days later, Kenzo was cleared to leave the hospital. The experience, Kamara said, offered invaluable perspective.

“When he got to go home, there is good energy again, but it also helps you see what is really important in life, and it’s easier to relax under pressure,” he said. “That changes you. It allows you to get a certain focus. Sometimes you are caught up in wanting this and that, but when something big happens, you understand that that is the only thing that matters.”

Kamara said he applied that mentality on the field.

“Getting your focus, this is what I’ve got to do,” he said, clapping his hands.

“I need to get in the box,” clapping again.

“I need to get chances,” clapping another time.

“You gain that focus from big life experiences. Sometimes you have to take that struggle and apply it to other parts of your life.”

At the top of the attack, Kamara has been the beneficiary of creative work by forwards Arriola and Yordy Reyna and crosses from wing backs Kevin Paredes and Julian Gressel. Starting with the Toronto game, he scored in six consecutive appearances, the longest streak in MLS this year.

Following a two-game scoreless pause, Kamara converted in three straight, culminating with a first-half hat trick against the Chicago Fire.

“Everything you do makes a difference,” Losada said of Kamara’s preseason preparation and in-season work. “Every meal, every extra hour of rest, the way you take care of your body — at the end, it pays off, and it’s paying off for Ola.”

Seven of Kamara’s goals have come on penalty kicks, extending his streak to nine over two seasons. He is 13 for 15 in his MLS career, with the last miss coming in 2017 when he was with Columbus. With only 13 starts and less playing time than MLS’s other leaders, Kamara is scoring every 70.5 minutes.

“Without a doubt, it’s different when you’re playing in a more attacking, aggressive system,” Arriola said. “There’s a lot of opportunity for him, and he is able to put a lot of them away. On penalties, he’s been lights out. Combine those two, he’s having a great year.”

Needing time for his body and game to adapt, Kamara didn’t expect to hit his stride until 2022, the final year of his contract.

“The goal was not to be very good now; the goal was to be very good next season,” he said. “So hopefully next season will still be better.”

Read more on soccer: