Drivers in New Jersey will be able to request vanity license plates that reference their belief in atheism after the state’s Motor Vehicle Commission settled a lawsuit this month filed by a woman whose request for a license plate that said “8THEIST” was rejected almost three years ago.

Shannon Morgan, a resident of Leesburg, N.J., applied for the license plate in November 2013 but was told her application had been denied because the plate “may carry connotations offensive to good taste and decency,” according to court papers posted online last week.

After she received that rejection, Ms. Morgan used the state’s online application form to apply for a plate that said “BAPTIST” and was quickly approved, said Richard B. Katskee, the legal director for Americans United for Separation of Church and State, an advocacy group in Washington that acted as her legal counsel. It sued the commission in April 2014.

“She rightly realized that it was a straight-up case of religious discrimination against atheists and nonbelievers,” Mr. Katskee said.