Supreme Court Justice Anthony Kennedy said Thursday that he was stunned by the progress of the gay rights movement.

The 77-year-old Kennedy, who wrote the landmark ruling that struck down the Defense of Marriage Act (DOMA) in June, is teaching this week at the University of Pennsylvania law school.

“We live in an era of time compression. It's simply stunning to me to see the change in attitudes,” Kennedy said, a reference to gay rights.

“It's something I didn't think about or know about as a kid. But the nature of injustice is, you can't see it in your own time,” Kennedy, who grew up in northern California, is quoted by the AP as telling the school's faculty.

The Supreme Court starts its annual term on Monday.