For almost two centuries, railway enthusiasts, engineers and scientists have tried to solve the mystery of Box tunnel, near Bath.

They have combed the history books, done the maths and carried out practical experiments to try to work out whether its creator, Isambard Kingdom Brunel, really did design the two-mile tunnel so that the rising sun shone right through it on his birthday, 9 April.

But now a new theory has emerged from a retired engineer and physicist who has reassessed the science, had a fresh look at the Brunel family tree and concluded that in fact the great railway builder might have designed the tunnel so that the phenomenon occurred not on his birthday but on that of a little-known sister – 6 April.

Peter Maggs, who has been working on the puzzle for more than 30 years, said he had a “eureka moment” when he discovered that Brunel’s sister, Emma Joan, was born on 6 April.

The baptism record that gave Peter Maggs his ‘eureka moment’. Emma Joan Brunel’s entry, and birthdate of 6 April, is about two-thirds of the way down the left-hand page. Photograph: Peter Maggs

“It was wonderful,” he said. “For years I had been crunching the numbers and trying to work out if the idea that the sun shone through on Brunel’s birthday could be right. Then I found a record of Emma Joan’s birth and it fell into place.”

The tunnel was completed in 1841 and the supposed rising sun phenomenon was first reported by the Devizes Gazette a year later. It surfaced from time to time over the decades and added to Brunel’s legend as a genius with a mischievous sense of humour.

In April 2017 the line was shut because of engineering work, providing Great Western Railway and Network Rail with a rare chance to observe whether the sun really does shine through the length of the tunnel on 9 April. Teams positioned themselves at the eastern and western ends of the tunnel and waited for the sun to rise. Disappointingly, they had to conclude that it did not quite beam all the way through.

This was no surprise to Maggs and others who have analysed the science and concluded that in fact a more probable date for the phenomenon was 6 or 7 April. So he took a different tack. “I thought I’d come at it another way – from the social angle rather than the scientific one,” he said.

Maggs began to investigate Brunel’s life and times to try to find out whether 6 or 7 April were significant dates for him. Eventually he tracked down Emma Joan’s baptism certificate, which gave her date of birth as 6 April 1803.

Brunel’s older sister, Sophia, was known as a spirited and powerful woman, but Emma Joan tends to be forgotten and was dismissed by an early Brunel biographer as “dim and rather ailing”.

Maggs, from Chelmsford, Essex, likes the idea that Brunel might have paid tribute to his younger sister by designing in a trick of the light.

But might it just be coincidence? “As to whether he really intended it, I reckon it’s 50/50,” said Maggs. “But the fact remains he did have a great sense of fun. It is possible. If he had done it for his birthday and he had been found out he would have come under a load of opprobrium from shareholders. It’s a lovely thought that he did it for his sister.

“Whether Brunel really intended this or it was just a happy accident we may never know, unless a scholar someday uncovers a previously unknown letter or document from Brunel either proving or disproving the fact.”