The New Jersey Department of Military and Veterans Affairs has agreed to pay $550,000 to settle a lawsuit from a veteran who claimed a National Guard general’s racist attitude cost the vet his job and numerous other opportunities.

George Anderson III sued after his firing in 2015, arguing that Brig. Gen. James Grant “fostered an environment of white supremacy" in the Department of Military and Veterans Affairs (DMAVA). Under Grant’s direction, he argued, he was blocked from promotions and retaliated against him for calling out the discrimination.

“For the first in a long time I can look towards the future, and not what transpired at DMAVA," Anderson said in a statement. “I am very thankful for all of the support I received and I am very glad this settlement finally puts an end to this entire ordeal.”

The state did not admit any wrongdoing in the settlement, but agreed to let Anderson resign so the termination will not mar an employment record his attorney described as “impeccable.”

In a statement, attorneys Matthew A. Luber and R. Armen McOmber said the firing turned Anderson’s life upside-down and the settlement “goes a long way in restoring George’s reputation and his family’s well-being."

The lawsuit in Superior Court in Mercer County was dismissed in December after the two sides reached a settlement.

It said Anderson, a 22-year veteran of the U.S. Air Force, took a job in 2008 as commandant of the Youth ChalleNGe Academy, a program to help high school dropouts get their GEDs. Grant became director of the joint staffs of the National Guard months later, making him Anderson’s superior.

Anderson said that Grant blocked him from getting better jobs six times and instead gave them to white employees, some of whom were less experienced and qualified. In one instance, he was denied a position he had previously held in the past, told only that the qualifications had changed.

Grant created an environment where racial discrimination was tolerated, the suit said, and white employees were promoted more, paid better, and given better hours. Black employees were not rewarded for good work, he alleged, and he saw his budget and staffing cut back.

When the National Guard Bureau inspected the youth program in 2015 and identified problems, Anderson said he was blamed and fired. He was replaced with a white employee, the lawsuit said.

In addition to the DMAVA, the suit named Grant and several other staff members. Grant was immune from the suit as a federal employee, a judge found. He previously served as a major with the New Jersey State Police, including during that department’s racial profiling scandal, and he was accused of racism in formal complaint in 2015.

The settlement signed in December dismissed the suit against all the remaining defendants.

The $550,000 payment will cover $193,450 in attorneys fees and costs, the agreement said.

The DMAVA did not return a request for comment Wednesday. The state’s Division of Law, which defended the case, declined to comment.

Rebecca Everett may be reached at reverett@njadvancemedia.com. Follow her on Twitter @rebeccajeverett . Find NJ.com on Facebook .

Have a tip? Tell us. nj.com/tips