FILE - In a  Friday, May 30, 2014 file photo, Miami Heat guard Ray Allen gestures after scoring a three-point basket during the first half Game 6 in the NBA basketball playoffs Eastern Conference finals against the Indiana Pacers, in Miami. Allen announced his retirement from the NBA on Tuesday, Nov. 1, 2016, ending a career that saw him make more 3-pointers than any player in league history and win championships with Boston and Miami. (AP Photo/Lynne Sladky, File)
FILE - In a Friday, May 30, 2014 file photo, Miami Heat guard Ray Allen gestures after scoring a three-point basket during the first half Game 6 in the NBA basketball playoffs Eastern Conference finals against the Indiana Pacers, in Miami. Allen announced his retirement from the NBA on Tuesday, Nov. 1, 2016, ending a career that saw him make more 3-pointers than any player in league history and win championships with Boston and Miami. (AP Photo/Lynne Sladky, File) Credit: Lynne Sladky

Miami — Ray Allen won championships in Boston and Miami, made one of the most memorable shots in NBA Finals history and has more 3-pointers than anyone who ever played in the league.

More than two years after his last game, he’s decided that was enough.

Allen announced his retirement on Tuesday in a post on The Players’ Tribune website. Allen spent 18 seasons in the league with Milwaukee, Seattle, the Celtics and the Heat, averaging 18.9 points in 1,300 regular-season games and appearing in 10 All-Star Games.

“I write this to you today as a 41-year-old man who is retiring from the game,” Allen said in his post, which was in the form of a letter to his younger self. “I write to you as a man who is completely at peace with himself.”

Allen had the record for 3-pointers in a season for seven years, his mark of 269 standing until Stephen Curry of Golden State made 272 in 2012-13 — a record Curry has topped twice.

In all, Allen made 2,973 3-pointers in regular-season games, which doesn’t even count the one that was his most unforgettable.

His 3-pointer from the right corner with 5.2 seconds left in Game 6 of the 2013 NBA Finals for Miami sent the Heat to overtime against the Spurs in a win-or-else game, and helped them go on to win the title in seven games.

Tuesday’s Games Cavaliers 128, Rockets 120

Cleveland — Kyrie Irving scored a season-high 32 points and Cleveland remained undefeated.

Kevin Love scored 24 points while LeBron James added 19 points and 13 rebounds as Cleveland placed six players in double figures. The Cavaliers are 4-0 for the first time in 16 years.

James Harden scored a season-high 41 points and had 15 assists for Houston.

Magic 103, Sixers 101

Philadelphia — Serge Ibaka sank two free throws with 1.4 seconds to snap a tie game and send Orlando over Philadelphia.

The Magic rallied from an 18-point deficit to win for the first time in four games this season.

Pacers 115, Lakers 108

Indianapolis — Paul George scored 30 points, including Indiana’s final 12 of the game to rally the Pacers over Los Angeles.

The Lakers trailed by as many as 16 points, but rallied and had their final lead at 108-107 before George put it away.

Pistons 102, Knicks 89

Auburn Hills, Mich. — Tobias Harris scored 25 points and Marcus Morris added 22 to lift Detroit over New York. The Pistons have won three in a row — all by double digits — since dropping their season opener.

Heat 108, Kings 96 (ot)

Miami — Goran Dragic scored 25 points, Tyler Johnson had seven of his 22 in overtime and Miami beat Sacramento.

Timberwolves 116, Grizzlies 80

Minneapolis — Zach LaVine scored 31 points and hit five 3-pointers, and the Timberwolves built a lead too big to give away for their first win of the season.

Gorgui Dieng scored 17 points for the Timberwolves (1-2), who led by 17 points in the opener against Memphis and 18 against Sacramento before losing both games.

Bucks 117, Pelicans 113

New Orleans — Giannis Antetokounmpo had 24 points and 10 rebounds, Jabari Parker added 21 points, and Milwaukee defeated winless New Orleans.

Jazz 106, Spurs 91

San Antonio — George Hill had 22 points and the Utah Jazz made a season-high 15 3-pointers.