On Monday 9 August, American real-estate agent and storm chaser Greg McCown captured a one-in-a-million shot - a flash of lightning against a stormy rainbow backdrop in Tucson, Arizona. 

If you can't recall the last time you saw these two meteorological phenomena in the same frame, your memory isn't failing you - what McCown managed to photograph is an extremely rare event, because rainbows and lightning strikes usually require very different conditions to form. "Usually, you don't get those two things to line up at the same time," Randall Cerveny, a professor of meteorology at Arizona State University in Tempe, told Live Science.

While an average of 100 lighting bolts hit Earth every second, the chances of one pairing with a rainbow are slim, said Cerveny, because of the way rainbows and lightning use raindrops in the atmosphere. 

Lightning is formed when there's a build-up of electrostatic charge in clouds that splits into two regions - one with a positive charge and the other with a negative charge. While scientists aren't entirely sure why, it appears that raindrops pull the negative charge to the bottom of the cloud while the positive charges stay up top. 

If the two regions become separated enough, the negative charge can 'leap' up to the positive region of a neighbouring cloud - sometimes kilometres away - to form horizontal sheet lightning, or it'll leap from the cloud towards a positive charge on the ground to produce a vertical ground strike like the one in the picture.

For a rainbow to form, on the other hand, raindrops need to be positioned inside clouds in such a way that they act like tiny prisms, scattering sunlight into separate wavelengths of colour as it passes through them. 

"The viral photo is especially rare because McCown had to be standing in between the Sun and the storm at the exact moment when the angle of the Sun hit the raindrops to form a rainbow, and the positive ground charges and negative cloud charges clashed in a flash of lightning," Elizabeth Goldbaum writes for Live Science.

McCown told Oli Smith at Express that he's been chasing the event for the past seven years. "It happened so fast I actually only saw the flash out of the corner of my eye. I couldn't wait to get home to bring it up on a big screen to make sure," he said. "That's when I really got excited. Everything was perfect, better than I imagined. It really is an adrenaline rush to get the shot, especially if it's one you've been chasing for a long time."

If you want to see rainbow lightning in action, astronomer Phil Plait accidentally filmed it last year and it's beautiful. Nature: the gift that just keeps on giving.