A young basketball player with autism from Cornwall, Ont., made an inspirational buzzer beater earlier this week with a little help from the opposing team.

David Williams, or "LeBron James" as he is known by his teammates, is on Cornwall Collegiate and Vocational School's basketball team.

The 16-year-old, who was diagnosed with autism at a young age, doesn't get too much time on the court.

"When he gets time to go into a game he loves it (and) appreciates any time he gets," his teammate Kyle Skidders told CTV Ottawa.

But on Monday, with his team 20 points behind and less than a minute left, his coach put Williams in the game.

A player on the opposing team passed Williams the ball. His first shot came nowhere close to the basket, but his teammate passed Williams the ball once again and he was able to make a basket just before time expired.

Both teams celebrated the buzzer beater and cheered Williams on, while his father, Brentt Williams, was able to capture the heartwarming moment on video.

"As I was taping it, I was crying because I realized what was happening," said Williams.

"You couldn't have scripted it –- that's a movie story."

He added that it "proved that everybody could be a winner."

But the inspirational play couldn't have been possible without the sportsmanship displayed by Amede Fontaine, the player from the other team, who passed Williams the ball.

"I thought it was the right thing to do," said Fontaine.

"He seemed very happy to go on the court -- I think it was his first basket -- so I wanted to make him even happier to be on the court and actually play, so I gave him the ball to see if could get a basket."

And Fontaine was right: the buzzer beater is a moment that Williams likely won't soon forget.

"It felt awesome. All my teammates were hugging me after the game," said Williams.

"It means a lot to me because it made my teammates proud, it made my school proud and it made my parents proud of me."