Veteran NBA referee Danny Crawford, one of the league’s best and most accomplished officials, is retiring.

The National Basketball Referees Association announced the news Wednesday on Twitter.

Crawford, 64, officiated 32 seasons and 35 Finals games, including two of the five games of the Cleveland-Golden State series in June.

“I left with gas in my tank,” Crawford told USA TODAY Sports. “Could I have gone two more years? Yeah, I could’ve. But I looked at how many years I gave them and said, ‘When do you stop?’ You keep working this job and you can’t physically do it anymore. I didn’t want that. I wanted to leave with my gas in my tank and I wanted to leave in a positive way.”

Crawford, who also was assigned to two All-Star Games, called his first Finals in 1995 – Game 2 between Houston and Orlando – and called at least one Finals game every season from that point until his retirement. He officiated more than 2,000 regular-season games and more than 300 playoff games.

Crawford knew Game 5 of the 2017 Finals was his last game as an NBA ref.

“Because I went into the season knowing I was going to retire, my goal was to try and talk myself out of it,” he said.

He didn’t talk himself out of it.

“I made it a point to go into the year and make myself aware of the energy in the building,” Crawford said. “I appreciated how talented the coaches were and how talented the players were and that I was a part of it all. I said to myself, ‘You know what? I’m not going to miss it.’ “

MORE NBA: Carmelo Anthony at ‘peace’ as future with Knicks remains in limbo

MORE NBA: Michael Jordan to LaVar Ball: I’d beat you on one leg

On the court, Crawford was calm and composed and had a commanding presence. He knew how to keep a game from getting out of control and had an outstanding rapport with players and coaches.

“I think I could relate to where the players and coaches were coming from because I played basketball,” Crawford said. “I had an awareness of the emotional state that the players and coaches were in. They had their pressures just like we had our pressures.

“My job was to give them an ear because they want to be heard. I think I did a pretty good job of…