English actor Matthew Lewis, who played the shy but courageous Neville Longbottom in the Harry Potter movies, has caused series creator J.K. Rowling to avert her eyes after posing in his tighty whities for a magazine.

Lewis shed his dorky, child-actor image — and most of his clothes — for a special "swimwear and underwear" edition of the British magazine Attitude.

The photo spread shows the shirtless, 25-year-old actor reclining in a suggestive pose.

'Warn me next time'

The transformation from the baby-faced Gryffindor boy-wizard to beefcake appears to have been too much for the modest Rowling to handle.

Matthew Lewis

Matthew Lewis, the former child actor who played the hapless Neville Longbottom in the Harry Potter movies, showed a different side of himself in the June issue of Attitude magazine, shocking Potter creator J.K. Rowling. (attitude.co.uk)

"Warn me next time, for God's sake," the bestselling author posted on Twitter Thursday. "I hastily averted my eyes and read an article on Political Correctness to get over the shock."

It's been four years since Lewis brought Rowling's character to life in the final Harry Potter movie. He's since moved on to more grown-up projects, including the upcoming romantic drama Me Before You.

But that didn't stop the young actor from recognizing that his shift must have been a surprise to the 49-year-old author, and he apologized for the shock. 

Matthew Lewis

Matthew Lewis attends the Premiere of Harry Potter & The Goblet Of Fire in 2005. (Andrew H. Walker/Getty Images)