Quarterback Josh Allen has apologized after tweets containing repeated use of the n-word emerged on NFL draft day.

Allen sent the tweets in 2012 and 2013 while he was still at high school and they have since been deleted but they have been widely circulated and Allen admitted they had been sent from his account.

“If I could go back in time, I would never have done this in a heartbeat,” Allen told ESPN on Thursday. “At the time, I obviously didn’t know how harmful it was and now has become.

“I hope you know and others know I’m not the type of person I was at 14 and 15 that I tweeted so recklessly ... I don’t want that to be the impression of who I am, because that is not me. I apologize for what I did.”

In the tweets, as well as his use of the n-word, he also responded to a question asking “Why are you so white” by writing “If it ain’t white, it ain’t right!”. Allen said the comment was a quote from the sitcom Modern Family, and that one of the uses of the n-word was from a Rick Ross song.

mike freeman (@mikefreemanNFL) Some of the things I'm hearing from around the league on racist Josh Allen tweets:

1. He was kid, give him a break.

2. He was more than old enough to know better.

3. Black player texted me saying he thinks Allen will initially have problem in locker room.

Allen was a star college quarterback at Wyoming and had been tipped as a potential No1 overall pick in Thursday night’s draft. However, his stock may well have slipped after the tweets emerged – he ended up being selected by the Buffalo Bills at No7 – particularly in a league in which the majority of players are African American. NFL writer Mike Freeman said on Thursday that he had received a text from one black player saying the tweets mean “Allen will initially have [a] problem in the locker room”.

Allen is not the first player to have been burned on social media on draft day. In 2016, video emerged of top prospect Laremy Tunsil taking a bong hit through a gas mask under a confederate flag. He subsequently slipped down the draft – potentially losing millions of dollars – before being picked up by the Miami Dolphins.