I was barely a moment inside Wal-Mart, studying the cucumbers and avocados, when a middle-aged man came up to say hi.

We started talking about the oil boom sweeping Williston, N.D. He said his co-workers were losing it out here in the middle of nowhere. Maybe he would lose it, too.

“You gotta really be focused on your sh--,” he said. “And it’s hard. And on that note, that’s why you should let me take you to dinner.”

I declined. He called later that evening to ask me on a date. He said he’d take me to Pizza Hut. I invented other plans. He phoned twice more.

Other women in Williston had warned me this would happen. They said they couldn’t go anywhere alone without receiving an offer of some kind from an oil worker. The 24-hour retailer on Route 2 was the worst. The parking lot was crammed with cars bearing license plates from dozens of states, any time of day, as guys poured in from all over the country to make their fortune.

Working in Minneapolis, I’d come across stories about the wild impact of the discovery of billions of barrels of oil in western North Dakota. The high-paying jobs. Once quiet farm roads now straining with traffic. Crime. Rents on par with Manhattan.

And another remarkable effect that came into focus only when I visited Williston myself: an influx of men — single and married, overworked and lonely, men with big dreams, men who keep their heads down, men who cause trouble — has made it an overwhelming place to be female.

The ratio of men to women is nearly a legend. Some say it’s two or three to one. One drunken man on the dance floor at DK’s Lounge and Casino swore up and down that it was 153 to one. Whatever the number, a woman here is in high demand.

Too much competition

I drove 10 hours west from Minneapolis after a friend of a friend, Ben Harp, helped set me up with a place to stay and offered to show me around. He told me to meet him in the Wal-Mart parking lot.

“You should see what I’m hitting on,” was the first thing he said to me.

In a country accent, the young oil worker from Idaho relayed how the night before, he was out at a bar called Champs, drunkenly flirting with a 53-year-old woman, when she punched him in the face.

There was too much competition anyway. “You have to be alpha to the max around here,” Harp said.

He didn’t even go out much anymore because too many guys at the bars were eager to get into fights. It wasn’t worth it.

We picked up a friend and then headed to Applebee’s for dinner. “That’s the hotspot,” said Harp. “It’s got the cutest chicks in town. The food’s terrible, and the service sucks, but … there’s no other place to go.”

Later in the night we headed to one of the town’s two strip clubs. They sit right next to each other on Main Street, near the train tracks. Dancers are flown in from all over the country to work a week or so before being rotated out for new ones.

At Heartbreakers, we ran into Crystal, a twenty-something woman whom Harp knew. Five guys were pursuing her, she said with a roll of her eyes. Some offered to take her on shopping sprees to outlet malls two hours away in Minot. But why bother?

“It’s a fat girl’s paradise,” said Crystal, who is thin.

Role reversal

In Williston, the women sometimes sounded like stereotypical men — casual about committing, feeling no pressure to lock a guy down. The men often sounded like anxious single women fretting that the opposite sex had too many choices.

“There’s women out there that their personality may be fine, but their looks are not, and yet they still got three guys looking for them,” complained one oil worker named Glenn. “There’s some of them that play games — ‘This guy is my boyfriend this week’ and ‘That guy is my boyfriend next week.’ ”

At the other strip club, Whispers, Williston native Colt Treffry shared a story that sounded like it was lifted from a country song: A man who came from Colorado to work the oil fields stole his wife away. She was at a bachelorette party at DK’s, the guy approached her and “he said, ‘You’re the most beautiful thing I ever saw,’ ” Treffry said. “I guess that’s what got her. Guys are hitting on girls 24/7.”

Treffry has a new girlfriend now, but he’s still not at ease. “I could be sitting right next to her in the bar and a guy will come up and say, ‘Hey, you wanna come with us?’… There’s too many guys compared to women out here,” he said.

Sense of security

The average annual wage in the county is $77,000. (The average wage in the state is pretty close to half that.) No college degree needed.

“That’s how most guys start off,” said Rob Strouf, a friend of Treffry’s: “ ‘I work for Halliburton, how you doing?’ ”

In 2000, the census put the town’s population at about 12,000. Some estimates put it at 30,000 today. The police force has more work to do. Overall, calls for police service have tripled. While calls for fights and domestic dispute calls have risen since 2009, sexual assault cases have fallen slightly. Still, plenty of women say they don’t feel safe.

At least three guys a day have tried to get Heather Montgomery, an employee at a staffing agency for oil companies, to go on a date. She had to order one man out of her office.

“He was young, he wasn’t bad looking,” she said. “It’s just, my God, the way he came on to me! He said he was going to stalk me on Facebook until my status changed to single.”

One man got the wrong idea when Keri Boda helped him find a frying pan. She was working as a saleswoman at the time. He asked her out for coffee.

“I said, ‘No, thank you, I’m married,’ and he goes, ‘Well, don’t let that stop you,’ and I said, ‘I think I will,’ ” said Boda. “It made me nervous. He would come back a lot and ask for me and I would go hide.” She now works at the library.

One guy from Alaska, stopping in Williston from Minot, boasted to me at Whispers that he had bedded three women since moving to North Dakota nine months earlier.

“Hey foxy!” he texted me later. “Matt here, come visit me.” Minot and its outlet malls were not sufficiently tempting.

Another man I interviewed called — and called. When I finally picked up, he said it was just nice to meet me, and he asked how I was doing.

“HELLO HOW YOU DOING TODAY,” he texted me later.

After I left town, a third guy messaged me to say he would come visit. I told him he was too old. “LOL I’m 50 but fun LOL,” he texted.

Such attention wasn’t frightening for me, but it wasn’t flattering, either. It was about being a woman in a place where women might be as much in demand as the oil.