Updated

Oakland Athletics outfielder Matt Joyce has been suspended two games for uttering a gay slur during a confrontation with a fan, Major League Baseball announced Saturday.

In a statement, Joyce said he was "beyond sorry" for what he said to the fan during Friday night's 8-6 loss to the Los Angeles Angels in Anaheim.

Joyce's lost salary — more than $54,000 — will be donated to PFLAG, a family and ally organization supporting the LGBTQ community. Joyce will also take part in a public outreach initiative with the organization.

"I sincerely apologize to the fans, the Oakland A's, MLB and most importantly the LGBTQ community for my comments and actions," Joyce's statement said. "A fan yelled vulgar and obscene words about me and my family and I let my frustrations and emotions get the better of me.

"I am beyond sorry for the inappropriate language that I used and understand and agree that those words should NEVER come out of someone's mouth no matter the situation. Anyone who knows me will tell you that it is not reflective of me as a person, how I treat others, how I live my life and that those hurtful words are not my views. I fully support and hope to help the LGBTQ community with their efforts in being treated fairly. I intend to let my actions speak louder than anything more that can be said about this truly regrettable moment."

The exchange occurred in the eighth inning after Angels first baseman C.J. Cron made a diving stop of Joyce's hard-hit grounder.

As Joyce returned to the dugout, he uttered several profanities at the fan, called him a gay slur and challenged him to fight, according to Associated Press photographer Mark J. Terrill, who overheard the exchange. Terrill said he didn't hear the first part of the exchange.

"The Oakland Athletics are very disappointed by the comments Matt Joyce made to a fan during the eighth inning of last night's game," the A's statement said. "This language is unacceptable and will not be tolerated by our team. We pride ourselves on being inclusive and expect our entire organization to live up to higher standards. We appreciate that Matt is contrite about his conduct and know he will learn from this incident."

Joyce, 33, is in his first season with Oakland, his 10th in the majors overall and played with the Angels for one season in 2015.

After the game, Joyce also acknowledged he shouldn't have reacted.

"It's just one of those things that fans kind of get into the game. Obviously, we're pretty frustrated on our side and I had just hit a ball hard and had Cron make a good play," Joyce said. "I was walking back to the dugout and just had a fan yell some vulgar and obscene words.

"For me it just wasn't the right time to say some stuff like that. I fired back and obviously as soon as you fire back you regret saying anything, because it's just not worth it."

The Associated Press contributed to this report.