Mike McQueary has ended his defamation and whistleblower lawsuit. (Gene J. Puskar/AP file)

Mike McQueary, the former Penn State assistant football coach who testified that he witnessed Jerry Sandusky sexually abusing a boy in a locker room shower in 2001, has ended his defamation and whistleblower lawsuit against the university.

McQueary, who testified vividly in the 2012 trial in which Sandusky was convicted of sexually abusing 10 boys over 15 years, had filed the lawsuit over lost wages in 2012, when he lost his job after the firing of former coach Joe Paterno when allegations about Sandusky, a former assistant to the late head coach, came to light in the fall of 2011. Sandusky is serving a 30-to-60 year sentence in prison.

Court records obtained by the Associated Press show that an attorney for McQueary filed for the lawsuit to be ended with prejudice Friday, which means it cannot be brought to court again. Although neither side indicated whether the parties had reached a settlement, the action points to the likelihood of one.

In a civil suit decision that Penn State has been seeking to have overturned, McQueary had been awarded more than $12 million last year.

McQueary was a graduate assistant at the time of the incident involving Sandusky and he testified that he had seen and heard Sandusky sodomizing a young boy in the showers. McQueary went on to testify that he alerted Paterno. “I’m sorry you had to see that,” he said Paterno told him in a brief conversation. “It’s terrible … I need to think and tell some people what you saw and I’ll let you know what we’ll do next … I know it’s probably tough for you to come here and tell me this, but you’ve done the absolute right thing.”

Paterno told his superiors, but an inquiry resulted in no charges and Sandusky continued to use Penn State facilities. McQueary said he would quickly leave the weight room whenever Sandusky entered and, when others questioned his reluctance to being around Sandusky, he said he’d answer, “I just don’t care to be around him.”

Read more from The Post:

R-r-r-r-rip: Nike goes to work fixing NBA jerseys after LeBron James and others have malfunctions

LaVar Ball thinks the Lakers should give his son Lonzo more playing time

Warriors’ Steve Kerr says gun laws should be considered ‘a public health issue’

After beating Wizards, LeBron James still rules the East

Browns’ Josh Gordon says he drank or did drugs before every game