David Scott, an elected councillor from Kapiti, near Wellington, has pleaded not guilty to rubbing his genitals against a female council staffer at a function last year.
The woman said the object she felt touch her back was four to five inches (10-12 centimetres) long, the stuff.co.nz news site reported.
In a highly unusual move, judge Peter Hobbs then allowed Scott's doctor to take the 72-year-old to the court's holding cells to measure his penis with a wooden ruler.
Hobbs suppressed the resulting measurement from public disclosure, Radio New Zealand reported.
But the accuser said the offending object pressing into her back could not have been a wallet, phone or insulin kit, and was in fact male genitalia.
The trial continues.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections. Election results will be out on May 23.