The teams will meet in the postseason for the first time since 1987 and the sixth time overall.

BOSTON – They squared off in the NBA playoffs four times during a five-year stretch during the 1980s with two series going seven games.

The Celtics and Milwaukee Bucks were postseason opponents on a regular basis in the days when Larry Bird, Kevin McHale and Robert Parish went against teams coached by Don Nelson.

But after the Celtics eliminated the Bucks in seven games in the second round in 1987, the teams were never paired up in the playoffs.

That will change beginning this weekend at the TD Garden when the second-seeded and shorthanded Celtics (55-27) face the seventh-seeded Bucks (44-38) in the opening round.

The matchup was determined late Wednesday night when an overtime victory by the Miami Heat over the Toronto Raptors finally settled the Eastern Conference playoff picture and put the Celtics and Bucks together for the first time in 31 years.

Had they not suffered a rash of injuries in March, leaving them without Kyrie Irving, Marcus Smart and Daniel Theis, the Celtics would be significant favorites in the series, but that is not the case now.

The Bucks, who were routed by the Philadelphia 76ers in their regular-season finale, are led by the remarkable Giannis Antetokounmpo with Kris Middleton and Eric Bledsoe capable of doing plenty of damage.

With a regular season that got off to a sour start when Gordon Hayward suffered a gruesome injury less than six minutes in on Oct. 17 now over, the Celtics turn their attention to the playoffs with far from a full cast of characters.

“We hear the chatter (about the injuries),’’ said Greg Monroe Wednesday night following a 110-97 victory over the Brooklyn Nets to finish the regular season. “It’s already the playoffs, but you just have to come out and exhibit some pride and prove people wrong.’’

The Celtics had the fourth-best record in the NBA behind the Houston Rockets, the Raptors and the Golden State Warriors, overcoming 216 man-games lost to injuries.

They took a hit last week when it was learned that Irving won’t be coming back until the fall, leaving the Celtics without their two marquee acquisitions from last summer. Despite all that happened, the Celtics won 55 games, their highest total since getting 56 in the 2010-11 season.

“For as much as we’ve been through this season, that says a lot about this team,’’ said Marcus Morris. “The young guys stepped up. I learned a lot about this team.’’

Now it falls on those youngsters, Jaylen Brown and Jayson Tatum, along with Terry Rozier filling in for Irving in the starting lineup.

“When I was coaching in college, it was everything for March,’’ said coach Brad Stevens. “It was what you got up early for to work out in the summer, it was what you went to every recruiting event for. It’s just what you always thought about.

“Here, it’s an absolute blast to compete in the playoffs. It’s what you work for. The players put in an incredible amount of energy throughout the entire season and had a great regular season. Some of them are going to play bigger roles than they thought.’’

The Celtics and Bucks split four games with three of them being played by early December. The last matchup was April 3 in Milwaukee when the Bucks held off the Celtics, 106-102.

The Celtics are 4-1 in playoff series against the Bucks, including a win in the 1974 NBA Finals and victories in the Eastern Conference finals in 1984 and 1986 on the way to titles.

None of that matters now as the Celtics try to plug holes created by the injuries and get past the Bucks with the winner of the opening-round series facing either the 76ers or the Heat in the second round.

“This is what it’s all about,’’ said Aron Baynes after getting a career-high 26 points with 14 rebounds in the win over the Nets. “Now it’s time to lock in and focus on the task at hand. It’s going to take a lot from us, but it’s going to be a fun one.’’