Elsa/Getty Images

The Miami Heat and free-agent center Kelly Olynyk agreed to a four-year, $50 million contract Thursday.

Agent Greg Lawrence confirmed the deal, which includes a player option for the fourth season, to Adrian Wojnarowski of ESPN.

Olynyk, 26, spent his first four seasons with the Boston Celtics. He averaged 9.0 points and 4.8 rebounds per game in 2016-17, shooting 51.2 percent from the floor. The Celtics renounced Olynyk's rights after they came to terms with Gordon Hayward.

A first-round pick in 2013, Olynyk has developed into a fine offensive big. He's good enough from three-point range that defenses have to respect him on pick-and-pops, and he has a propensity for random flashes of brilliance. His 26-point outburst in Game 7 against the Washington Wizards almost single-handedly propelled the Celtics to the Eastern Conference Finals.

"Just control what you can control," Olynyk told reporters. "Whatever happens, happens. However the cookie crumbles, it does. But you just control what you can control. You can't worry about things that aren't in your control.

"Just getting better. Getting better as a player every single day, physically, mentally, studying the game, whatever it is. But just trying to get better every single day."

Olynyk will fit in next to Hassan Whiteside in the Heat's starting lineup or as their first big off the bench. Either way, he might get some additional shot opportunities that weren't available in Boston. The Celtics' logjam of talent and need to get everyone minutes limited Olynyk's time to around 20 minutes a night in each of his first four seasons.

Video Play Button Videos you might like

If he can increase that to 25 to 28 minutes, this could look like a good contract if his splits continue over the increase in minutes.