Getty

Tensions were high at the US Open on Wednesday after Taylor Townsend defeated Jelena Ostapenko in straight sets ... as the two got into a heated confrontation that was all caught on camera.

The beef started as the two shook hands at the net ... when it appeared Ostapenko said something that set Townsend off.

"You should learn how to take an L," Townsend appeared to respond.

The tennis players continued exchanging words as the crowd began to boo, with both getting in each other's faces.

A fan courtside caught a quick snippet of their interaction on their phone ... and Townsend can be heard in the clip telling Ostapenko to handle her defeat in a better way.

"You can learn how to take a loss better," she said. "Thank you so much. Great job, great play."

The 29-year-old Townse

See Full Page