We were out sailing Saturday when a thunderstorm came up "real fast". We were on a port tack close reach heeling about 20 degrees. To get back to the marina I needed to go to a run. When I tried to head down the wind came up even more and we darn near got knocked down (admiral not happy). Headed back up and eased the sheets all the way out and was able to go to the run but still way overpowered going 7.2 to 7.9 knots. Wanted to reduce sail but didn't feel comfortable going back into the wind to so cause that would've taken time and with the gusts would have been difficult. I forgot to mention that the storm was accompanied by a lot of lightning so everyone aboard, including me, wanted to get in ASAP. I managed to get the jib in using the winch and went the rest of the way under main alone eased as far out as possible but it was rubbing the spreaders and I know that ain't good. Here's the question, could I have reefed or dropped the main without heading back into the wind? In the debrief I did in my head afterwards I probably should have dropped the main and gone under jib alone but I can't figure out how I should've done it under those conditions.