In 2011, Matt McIlvane was hired to coach the Danville Dashers of the Federal Hockey League.

It was November and by then, he was already the third coach for a team that was still searching for its first victory, having started the season 0-26. Danville’s original coach had been fired and No. 2 was forced to leave because of a head injury he suffered after being accidentally tripped by a player during practice.

Yes, it had been that kind of a year.

When McIlvane walked in the door, he had no previous head coaching experience and couldn’t even imagine the magnitude of the task that lay in front of him until he arrived on the scene in Danville, Ill.

The good news: There was nowhere to go but up.

It wasn’t long before Danville started to turn the corner, kick-started by a rigorous team-building training camp McIlvane put them through during a break in the schedule in December. Not only did McIlvane learn to create a professional environment for a team on the lowest rung of the professional hockey ladder, he also found himself involved in nearly every department of the organization.

It’s a lesson that will serve him well as the new head coach of the San Diego Gulls of the American Hockey League, the Ducks’ primary minor-league affiliate.

“I learned a lot about the holistic view of professional hockey,” McIlvane said in an interview with the Orange County Register. “And I’ll put ‘professional’ in quotes. It was a really, really great learning experience.

“When I came in, there hadn’t been a coach of the team for three weeks and it was like, ‘Wow, a real coach.’ I’ve never felt so valuable to that environment as I did that day.

“My biggest lesson from Danville: I learned how to work.”

Last month, the 37-year-old McIlvane was hired by Ducks general manager Pat Verbeek to coach San Diego, arguably one of the most important hires Verbeek has made in his 15 months on the job. This past season, the Gulls (20-49-3) were the worst team in the AHL, which is where Danville was in the FHL when McIlvane took over.

It’s critical the Gulls make strides, not just in the standings, but because the Ducks are entrusting McIlvane with the development of their young prospects coming through the organizational pipeline.

They are still early in the rebuilding process under Verbeek. The pieces will need to be supplemented with the prospects that have been acquired via draft choices and trades for core pieces such as defensemen Hampus Lindholm and Josh Manson and forward Rickard Rakell.

McIlvane moved on from Danville to eventually coach in Europe, where he spent 10 seasons as either an assistant or head coach. Most notably, as head coach with EC Red Bull Salzburg, he won consecutive league championships in 2021-22 and 2022-23. At the start of his European adventure, McIlvane was mentored by Don Jackson, who played 315 games in the NHL and was an NHL heavyweight when that still mattered, but always had a cerebral quality, suggestive of a bright coaching future.

Their association dates to when the teenage McIlvane was on a youth hockey team with Jackson’s son and Jackson worked briefly with his son’s youth hockey team. McIlvane was an eighth-round draft choice (No. 251) in 2004 by the Ottawa Senators. He went on to play at Ohio State and for Jackson for part of a season in Berlin. His minor-league career, which peaked at the AHL level, ended because of injuries.

After that brief but memorable coaching stint in Danville and short runs in the ECHL and USHL, came a job opportunity from the European coaching legend, Jackson, who was looking for an assistant coach in Salzburg, Austria.

“That was the opportunity that changed my life,” McIlvane said. “It’s incredible what he has accomplished in the German League and in that world over there in Europe.

“Don is always thinking about the players ... and how are the players going to be able to receive this message. The humility, the system, and the ability to put the players first, that is the big takeaway from (Jackson).”

In addition to coaching in European leagues, McIlvane was an assistant on the German staff at the 2018 Olympics in PyeongChang, which resulted in a country-best silver medal.

As it turned out, McIlvane was an 11th-hour replacement on Marco Sturm’s coaching staff.

“I guess it was all meant to be,” Sturm said. “Matt was close by. Matt was good. A good teammate and a good person. He checked all the boxes for me without even knowing him. We clicked right away.

“I was very lucky. We ended up in a pretty good tandem. He’s a wonderful man. Anaheim is lucky to have a guy like him in the organization.”

Sturm is now coaching the Kings’ AHL affiliate, the Ontario Reign, who will arguably be the Gulls’ biggest rival, given the geographic proximity and competitiveness between their NHL parent clubs.

“I always told him — and, hopefully. he feels the same way — If I’m going to be a head coach somewhere, I would definitely get him on my team, on my coaching staff,” Sturm said. “That’s how much I like him.”

Verbeek sees many of the same qualities in McIlvane and acknowledged the importance of the position at McIlvane’s introductory news conference in San Diego in April. He first met McIlvane about 10 years ago and the decade’s worth of conversations about hockey has created admiration and trust.

“Matt’s a winner,” Verbeek said at the news conference. “He understands what it takes to build winners. Understands how to work with players. Different types of players, whether it’s old players, younger players. How to be able to merge them into one cohesive unit.”

It’s not beyond the realm of possibility that if McIlvane has success at the AHL level, he could one day become an NHL coach. The Ducks can assess him from a relatively nearby vantage point, and he can do the same.

Currently, the position of Ducks’ head coach is open after Dallas Eakins was not retained. There is the possibility the job may not be filled before the NHL draft in late June, Verbeek said.

McIlvane will be the fourth Gulls coach in four seasons, following in the shoes of the recently retired Roy Sommer, Joel Bouchard and Kevin Dineen. While the challenges in San Diego aren’t exactly as daunting as the ones he faced in Danville, there are some similarities.

There are the twin goals of turning the page but also trying to figure out what went wrong this past season. Already, McIlvane has either talked on the phone or in person with about half of the team and staff that will be back next season. He said he is feeling “excitement” from them about the upcoming season.

“It seems like there’s a lot of guys excited about the opportunity to be able to represent the San Diego Gulls,” McIlvane said. “These are guys that want to be Ducks, no question about it.

“They want to play in the NHL, but also realize what a fantastic franchise San Diego has to offer and there’s an excitement about the opportunity for a fresh start and to build something.”

If it sounds like there’s a lot of the fictional character, Ted Lasso, in McIlvane’s résumé, well, that’s not a coincidence.

“Pat Verbeek and I have a running joke,” McIlvane said. “There’s a lot of Ted Lasso in my personality and in my coaching style.”