NBA star James Harden was battling the stomach flu before last night's game against the Boston Celtics - and maybe he should have sat out.

During the second half of the game, the NBA star appeared to have an accident, and pooped in his pants.

The game was televised nationally, so James' accident was seen by millions of TV viewers.

Here are some pictures:

Despite James' accident, the NBA star refused to sit down and continued to play until the end of the game.

He played for 41 minutes and scored 21 points and his effort on behalf of his team apparently paid off, as the Rockets won last night.

James Harden is an basketball player for the Houston Rockets of the National Basketball Association (NBA). He played college basketball for Arizona State, where he was named a consensus All-American and Pac-10 Player of the Year in 2009. 

In 2018, Harden led the league in scoring and was named the NBA Most Valuable Player. He is an eight-time NBA All-Star and has earned All-NBA Team honors six times, including five first-team selections.

Harden is a two-time member of the United States national basketball team, winning gold medals at the 2012 Summer Olympics and 2014 FIBA World Cup.

Harden started growing his trademark beard in 2009 after being too lazy to shave. His beard has appeared in songs and T-shirts, and it earned him an endorsement and a unique candy with Trolli's where a depiction of his face and beard was shown on each gummy.

On August 3, 2015, the sports apparel company Adidas submitted an endorsement deal to Harden worth $200 million over the next 13 years.