A Great American Cookies employee was suspended last week for offering to buy an on-duty police officer's cookie while working behind the counter, the employee's mom said in a viral Facebook post.

Zack Randolph, 18, was working behind the counter on July 2 at the chain's Katy Mills Mall location in Texas. The suspension was set to last for a week.

"My son offered to pay for his cookie with his own money. The officer was grateful (and) said thank you and walked away," Randolph's mother Tami Kurtz Randolph wrote. "The next family walked up and said, 'Are you going to buy mine too?' My son replied with 'I'm sorry I bought his because he is wearing a badge.' Then this customer started verbally attacking him, calling my son a racist, and threatened to beat him up."

Last Tuesday, Randolph was told that upper level management wanted to fire him for last week's incident, but his manager insisted on keeping him, his mom said. He was told that if he did the same thing again after his suspension, he would be fired.

Both Great American Cookies, and the operator of the location in Texas, released statements to the Houston Chronicle condemning the decision to suspend Randolph.

"On behalf of Great American Cookies Katy Mills, we owe the employee an apology," Biju George, VKC Refreshments, owner and operator of the store, said in a statement to the Chronicle. "It was never an issue that he purchased a brownie for a police officer, but rather the events that unfolded with another customer in line at the time. However, after further review, we realize that the employee was in fact in the right and we continue to reach out to him and his mom to issue an apology. The corrective action and suspension was reversed immediately and we hope to connect with him today."

"Great American Cookies proudly supports Law Enforcement, First Responders and all who serve our country," David Kaiser, executive vice president at Great American Cookies said in a statement to the Chronicle. "Though our stores are independently managed and operated, when the situation first arose, we reached out to the franchisee to ensure that the situation was addressed and handled appropriately."

Tami Kurtz Randolph said if her son would do it again.

"Thankfully my son said he would do it again in a heartbeat," she wrote.