When Gil Hanse flew to Rio de Janeiro with his wife and the couple's youngest child at the start of 2013 to supervise construction of the golf course for the next Summer Olympics, he figured it would be "a slam dunk" to build it in about 10 months given that grass could grow year-round in the balmy Brazilian climate.

There was no way, however, that Hanse, a Malvern resident who is one of golf's most highly regarded course designers, could have foreseen the land ownership disputes, environmental protests, logistical nightmares and broken promises that turned the historic project into a stressful undertaking of more than two years for him, his team, and his family.

The good news: The course has been completed - something that can't be said for a lot of venues in and around Rio - and is ready to go in August for the start of the first golf competition in the Olympic Games since 1904. Despite the obstacles and delays that made him wonder if the layout would ever get done, Hanse is thrilled with the finished product.

"I think the tipping point would have been if they had asked us to compromise on the design," the 52-year-old Hanse said Friday in an interview at his home. "If you go through all this sort of aggravation, and you come out at the end with something that you're proud of and you're excited to have built, then it's worth it.

"If you go through the aggravation and you come out at the end with something that you're having to apologize for, then that wouldn't have been worth it. I don't feel like we're going to have to apologize for this golf course."

The mostly flat par-71 layout, located in the Barra da Tijuca region just three miles from the Olympic Village, plays at 7,128 yards for the men and 6,245 yards for the women. The medal competitions, both 72 holes of individual stroke play, will be conducted from Aug. 11 through 14 for the men and Aug. 17 through 20 for the women.

Built mostly on what used to be a sand quarry, the course "has a linksy feel and look to it," Hanse said, with wide fairways, 79 bunkers and four holes where water may come into play. Its primary defenses are wind and a firm and fast track.

"Thankfully, at no point during the process did they ask us to modify or change the design in a way that we didn't think was positive," Hanse said. "The process of getting it built, that was the thing that lagged, and we weren't given the resources to do it. But at the end of the day, the design really did turn out as we had hoped."

It didn't look good for a while, however. The January 2013 start of the project was held up for more than two months because of legal challenges. It took two months after that before Hanse and his crew started receiving paychecks; he thought about shutting work down. The resources offered to him were inadequate.

"At the start, we had a bulldozer that was ancient," Hanse said. "I'd run it for a half hour, and it would overheat, and I'd have to let it sit for 20 to 25 minutes to cool down. We were given three trucks to move sand around the site, but they were on-road trucks, so we spent more time pulling them out of the sand than building.

"On a certain level, it was kind of comical because you're like, 'Really? This is how this is going to work out?' We've been asked to build a very visible golf course, and we're doing it with three of us and six Brazilian workers, who were all great guys but had never seen a golf course let alone know how to build one."

The saving grace for Hanse was having family to come home to at night. He called his wife, Tracey, "the rock of the whole thing . . . always very upbeat."

"He's never been that frustrated, never before and never since," Tracey Hanse said. "I think that having us there was somewhat of a calming effect on him. He got to come home to nice happy people by the end of the day, which was great."

Hanse said the plan was for Tracey and their daughter, Caley, to remain in Brazil until the project was completed, but they returned home after seven months because "I couldn't ask them to spend another section of time, and it was pretty stressful on all of us, primarily because the work wasn't going well."

Court challenges held up the project. A dispute over who owned the land dragged on, with one claimant wishing to build houses there. Environmental protesters camped outside the site for months and filed suit challenging the legality of construction permits while insisting the project be moved.

"The more frustrating and difficult things were the things that we thought we should have control over," Hanse said. "But that was taken away by the land owner and developer who really didn't have a full understanding of what it took to build a golf course. All the golf guys were pulling their hair out trying to get this thing built while all the other stuff was happening on the outside."

Sensitive to ecology

Only 12 or 13 holes were shaped after a full year but progress picked up a little at a time. Contractors for the golf course and its irrigation system were hired. Eventually, the argument over land ownership was settled and, in November 2014, a judge denied a request by area prosecutors to halt the project on environmental grounds because the developer had agreed to make some changes.

Hanse was sensitive to the ecology given that some of the course was located in the Reserva de Marapendi, an environmentally protected area. He said more than 90,000 indigenous plants have been put back on the site, and that the layout "passed with flying colors" an independent environmental assessment commissioned by the Rio government.

"There's a certain section of the property where we were limited in what we could do," he said, "and we voluntarily limited ourselves even further by shifting some golf holes around in areas where there is indigenous vegetation and wildlife."

Another example of environmental sustainability came through Hanse's selection of turf grasses that were drought-resistant and pest-resistant and required a minimum of chemical treatment.

Under the direction of the course superintendent, Neil Cleverly of England, the grass - the last piece of the construction puzzle - grew in during Rio's recent summer months of January, February and March, and is mature. The task now is "doing the detail work, which through the process, we weren't sure if we would ever have time to worry about that sort of thing," Hanse said.

The organizers staged a test event in March with nine Brazilian golfers, which was a little later and with fewer golfers than the International Olympic Committee would have liked. But Hanse said the event went "extremely well," and former LPGA player Candy Hannemann, who is playing full-time in an effort to make the Olympic team of the host country, agreed.

"I think it's a good ball-striker's course," Hannemann said. "It requires all parts of the game because you really have to be specific on where you place the ball on the green for each pin. I think a person that's pretty creative with their short game will definitely benefit."

Hannemann, the 2001 NCAA champion at Duke, called Olympic golf "a huge thing for Brazil" because there is no access to the game for anyone other than the wealthy. The Olympic course will become public after the Games are over.

Would do it again

Meanwhile, Hanse is working on a number of other projects - a third course at Streamsong Resort in Florida, a redesign of the South course at Los Angeles Country Club, the new Mossy Oak Golf Club course in Mississippi and as consulting architect at Aronimink Golf Club in Newtown Square.

Along with Tracey and the couple's three children, Hanse will be at the Olympics serving as a "sounding board" for the daily setup of the course. He said the setup will be a balancing act, that some competing countries won't have golfers with the same ability as those from North America, Europe and Asia.

"While we don't want to see guys shooting 59," he said, "we also don't want to see guys shooting 95. And it's the same thing with the women."

The stresses and frustrations of the course construction project are behind Hanse, and he looks forward to enjoying the first Olympic golf competition in 112 years - on his course. So would he do it again?

"I recently saw some photos of the construction project, and looking back I'm thinking, 'You know, this was a pretty cool process,' " he said. "So I think time heals all wounds. Looking back now, yeah, we'd do it again in a heartbeat."

jjuliano@phillynews.com

@joejulesinq