LOS ANGELES — Chase Utley spent the last few years of his illustrious baseball career in a different role as a player with the Dodgers. On Friday he announced another change, retiring at the end of the season to spend more time with his family.

“I transitioned to a part-time player, something that was new for me, but I took it in stride. I really enjoyed that time,” Utley said. “I’m also a part-time strength coach, a part-time pitching coach, occasionally a part-time catching coach, as well as a part-time general manager.

“The thing I’m having the most difficult time with is being a part-time dad. That’s really the reason I’m shutting it down, to be a full-time dad. It is a difficult decision, but one I’m comfortable with.”

Utley said he came to terms with the decision about a month ago, and told the team of his decision during a team meeting on Thursday in San Diego.

“Chase did it in an uncharacteristic, uncomfortable way for him,” manager Dave Roberts said. “But I think it was the right thing to do. He’s got some peace, and he’s looking forward to help us win baseball games.”

In 57 games this season the 39-year-old Utley is hitting .231/.313/.331 in limited duty. He’s 12th on the team in plate appearances (147), and has started 30 of the team’s 93 games. He was a six-time All-Star with the Phillies.

Utley in February signed a two-year, $2 million contract to return to the Dodgers, though the length of the deal seemed more to placate the Dodgers’ desire to stay under the competitive balance tax in 2018 than anything.

Now, any contributions Utley has next season would be in a non-playing capacity — Roberts suggested player development or special assistant — and largely dependent on allowing Utley time to spend with his wife and two sons, ages three and six.

“The impact he’s had on this organization is immeasurable,” Dodgers president of baseball operations Andrew Friedman said. “To think about the 2019 Dodgers without Chase is difficult, but we will do everything we can to steal as much of those hours as Jen and the boys will allow.”

That impact was evident on Friday, when nearly the entire Dodgers team, including players and coaches, crammed into the small media room already filled with reporters. Several players, including Corey Seager, Clayton Kershaw, Rich Hill, Joc Pederson and Austin Barnes, were even sitting on the floor.

One of the many young Dodgers that Utley has impacted is Kiké Hernandez, who has playfully referred to Utley as “Dad” for a while, and even had bats made with Utley’s uniform number 26 for Hernandez to use.

“He’s changed everything. He’s changed the way I see the game, he’s changed the way I eat,” Hernandez said. “He changed the way I prepare in the offseason, and from now on if I end up having a pretty successful career, whether he likes it or not he’ll have had a lot to do with that.”

Hernandez recalled first meeting Utley as a rookie in 2014.

“When I first got to the big leagues, I got to second base when I was with the Marlins. I said, ‘What’s up’ to him and he just stared at me, mean-mugged me,” Hernandez recalled. “Then I started smiling and I think that made him mad, and I thought Chase was a total asshole.”

One year later, Hernandez was with the Dodgers and Utley was acquired in August.

“I went up to Jimmy Rollins, who laughed and said, ‘Yeah that’s the same Chase that I know. Just wait until he gets here, you’re going to love him from the first day.’ Sure enough, [Utley] adopted me. One of the reasons he is retiring is to spend more time with me.”

Since returning from the disabled list on June 22, Utley has started just four of 20 games, and Roberts at the end of June described Utley’s reduced role: “It’s a once-a-week thing, understanding his value is as a pinch-hitter, to give us a good at-bat off the bench.”

Utley this season is 9-for-22 (.409) with two doubles and a triple as a pinch-hitter this season, leading the Dodgers in pinch hits.

He thinks getting this retirement announcement out of the way now will help him focus on baseball down the stretch.

“It gives me some clarity with 2½ months left and possibly a full month of postseason, getting this out of the way now, getting it off my chest, I’ll be at ease a little bit more,” Utley said. “I can go into the last chapter of my baseball career with enthusiasm and excitement, but most of all a clear mind.”