MIAMI (AP) _ Now that the best team in Florida has been determined, the Miami Heat face a grudge match against the New York Knicks.

By beating the Orlando Magic 91-83 Sunday, the Heat advanced to the second round of the playoffs for the first time in their nine-year history. Miami will take on coach Pat Riley's former team in a best-of-7 series beginning Wednesday at Miami Arena.

``I'm two years away from New York,'' said Riley, who feuded with Knicks management before taking the Miami job in 1995. ``I'm happy down here. We've turned it around and have something good going.

``There's probably going to be a lot of stuff come out about the past, but I have great respect for that team and I know how good they are. We're going to have our hands full.''

The Knicks won three of four games against Miami during the regular season, but the Heat won the Atlantic Division to claim the home-court advantage for the playoff series. Second-place New York finished four games back.

``There's a lot of animosity between both teams,'' Heat center Alonzo Mourning said, ``not so much on the floor with the players but with the people in the front office.''

The Heat have already prevailed in one rivalry, withstanding one last comeback by the Magic to win the deciding fifth game in a roller-coaster series.

Miami blew out Orlando at home in the first two games before the Magic bounced back at the O-rena. The home team won every game by an average margin of 16 points, and the home court may have been the difference Sunday.

Orlando scored 10 consecutive points midway through the fourth quarter and reduced a 17-point deficit to three. But All-Star guard Tim Hardaway shook off a shooting slump to hit two baskets in the final 43 seconds for Miami.

``We never gave up,'' said Orlando's Penny Hardaway, who scored 33 points. ``We kept shooting and got ourselves in a situation to win the game. We just didn't do it, but we never gave up.''

With his clutch baskets, Tim Hardaway finished 5-for-20 and scored 11 points.

``Even though he had gone 3-for-18, he made the two biggest shots of the season for us,'' Riley said. ``He shot them with confidence in the 48th minute. That's why he is who he is.''

Hardaway knows he needs to shoot better against the Knicks. He hit just 30 percent in the series and averaged 14.4 points.

``I had some easy shots that I normally make,'' he said. ``I just wasn't making them this series. Maybe I was too hyped.''

Orlando struggled against Miami's stifling defense Sunday, shooting just 39 percent. Penny Hardaway, who had 42 points in Game 3 and 41 in Game 4, faced frequent double-teaming for the first time in the series and missed 14 of 22 shots. He had 10 assists in 47 minutes.

``He did everything possible to carry this team home,'' Magic coach Richie Adubato said. ``The way he played in the last three games, we are looking at the next Michael Jordan. No question about it.''

With Orlando starters Horace Grant and Rony Seikaly still sidelined by injuries, Mourning dominated inside after a slow start. He scored 22 points, grabbed 12 rebounds and blocked four shots. Voshon Lenard did the damage outside with 19 points.

``There was a lot of pressure on us,'' Riley said. ``Our guys stepped up without any fear.''

The Heat struggled against Orlando's small lineup, and they may be more comfortable with the challenge posed by the bruising Knicks.

``It'll be a great series,'' Penny Hardaway said. ``They're similar teams. Both have great defensive teams and are very predictable. They know what they want to do.

``I have to give the Heat the advantage because they have the home court. It was very important in this series, and it'll be important throughout the playoffs.''