“All parties deny any wrongdoing or liability, but wish to resolve their disputes to avoid the time, expense, stress and other impacts of continuing litigation, which would interfere with the mission of educating the students of MISD,” the district said.

The district had denied discriminating against Ms. Bailey. Instead, the district said, it was concerned that she had not followed district guidelines that require “controversial subjects be taught in ‘an impartial and objective manner.’”

“Teachers shall not use the classroom to transmit personal belief regarding political or sectarian issues,” the district said in May 2018 after Ms. Baily filed her lawsuit in federal court in Dallas.

Ms. Bailey sued after the district told her in April 2018 that she would not be allowed to return to Charlotte Anderson Elementary School and would instead be reassigned to a high school in the district. That fall, she was transferred to Lake Ridge High School in Mansfield, where she continues to teach art.

“To me, that was not only hurtful, it was unacceptable,” Ms. Bailey said, adding that the transfer sent the message that “gay teachers are not allowed at the elementary level.”

Ms. Bailey stood silently with Ms. Vazquez, who is now her wife, at a news conference with her lawyer, Jason Smith, to announce the lawsuit. She said the district told her she could be fired if she commented on the case.