A high school golf coach resigned a day after posting tweets directed toward Darrell "Bubba" Wallace Jr., who next season will become the first full-time African-American NASCAR Cup driver since 1971.

Cambridge (Wisconsin) High School coach Brent Nottestad tweeted several times to Wallace on Wednesday, including making a reference to Wallace's grandmother, who died a year ago, when he wrote, "Granny Jan die in a police shooting?"

According to The Cambridge News, Nottestad also tweeted, "Hey @BubbaWallace. Please quit with, 'I'm black' bs. You're terrible. There are 1423 more credible drivers to get that ride than you," and to a photo of Wallace and a fan, "Almost looks like going to the zoo."

The number 1423 is often used as a reference to a white supremacist group, according to the Anti-Defamation League.

The tweets have been deleted.

Wallace, whose tribute to his grandmother is pinned to his profile, responded to Nottestad's tweets on Wednesday night.

You're a smart guy? a disgusting but smart guy right? This makes you look pathetic and weak, it's sad. You said what you meant and now worried about the repercussions..that I pray to God will happen. Oh and my granny hopes so too🤘🏽 — Darrell Wallace Jr (@BubbaWallace) November 9, 2017

Wow, I feel truly sorry for your kids. Again..to have so much hate towards somebody you've never met. Hope your kids grow up to be the exact opposite of a father you are.. https://t.co/yxLhvjjxQ8 — Darrell Wallace Jr (@BubbaWallace) November 9, 2017

Nottestad resigned Thursday, according to a news release from the School District of Cambridge administrator Bernie Nikolay.

"The Cambridge School District was made aware of several offensive comments made on social media by Cambridge High School boys' golf coach, Brent Nottestad," the statement said. "After a meeting between Mr. Nottestad and school district officials this morning, Mr. Nottestad resigned his position with the district, effective immediately. As this is a personnel matter, no other statements or comments will be forthcoming from the school district."

Nottestad, who coached for four years and held no other positions at the school, told ESPN via direct message that he was disgusted with himself for writing the tweets.

"I wish I could go back in time but I can't," Nottestad wrote. "I honestly don't know what I was thinking. Perhaps trying to be a tough guy behind a computer screen? I don't know."

He added that he had no idea what 1423 meant.

"I assure you, I had no idea of its meaning," he said. "It was merely a random number, I can promise you that! I have let a lot of people down and I have lost a job I truly love doing.

"I have driven the axe further into the civil rights fight when we are trying to remove it as a country. I am so sorry for what I've done. I am going to reach out to Bubba soon. I don't expect him to forgive me, but I gotta give it a shot."

Nottestad's tweets came after Wallace had tweeted about his new ride at Richard Petty Motorsports.

There is only 1 driver from an African American background at the top level of our sport..I am the 1. You're not gonna stop hearing about "the black driver" for years. Embrace it, accept it and enjoy the journey.. — Darrell Wallace Jr (@BubbaWallace) November 8, 2017

RPM co-owner Andrew Murstein said he was sorry to see racist tweets directed toward Wallace.

"When we announced Bubba, I spoke to my good friend Hank Aaron, who is also from Mobile, [Alabama]. We both were keeping our fingers crossed we would never again see racist comments like what Hank went through when he was approaching breaking Babe Ruth's record," Murstein said. "Thus I was very sorry to hear about those recent tweets. In Hank's days, they were letters that were mailed to him and in today's times they are tweets, but the message is the same."

Next season Wallace is replacing Aric Almirola, a driver of Cuban descent.

"Bubba is a great driver, and we are really excited to have him on our team and driving the 43 car," Murstein said. "Our team recognizes talent first, and that is displayed through our array of drivers, such as our future star driver Bubba and our current driver who is of Hispanic descent.

"Bubba is not only smart, charismatic and talented but has the potential and the skills to one day compete to be the first African-American NASCAR champion."