Ryan Leandro, a fourth grade teacher at the Edgartown School, said he was anxious when town clerk Wanda Williams reached into a wooden drum to pick the first lottery ball at Monday’s selectmen’s meeting.

“Panic,” Mr. Leandro said. “Lots and lots of anxiety, but excitement.”

His was the first of three names out of the drum, awarding him the right to buy a half-acre housing lot on 6th street North for $75,000. The lottery was part of Edgartown’s affordable housing program.

“It felt great,” Mr. Leandro said. “Just thrilled, really, really thrilled. I can’t even talk right now.”

The second lottery ball out of the drum was for Casey Ryan O’Connor. He was working and unable to attend the drawing.

The third lottery winner was Chris Costello, who lives in Edgartown and works for Contemporary Landscapes.

“I was nervous,” Mr. Costello said. “I was shaking. I didn’t really know what to think. I was just hoping for the best.”

The three lots were taken by the town for unpaid back taxes in 2015.

There were 25 applicants eligible for the lottery, and most attended Monday’s drawing. In order to be eligible, applicants had to live or work in Edgartown for the past five years.

Five alternates were also drawn. The alternates will be eligible to buy a housing lot if any of the three winners are unable to complete the purchase.

Selectmen’s assistant Karen Fuller offered a word of encouragement to those who didn’t see their lottery ball come out.

“This is something we expect to be doing more of in the future,” Ms. Fuller said. “You will be able to apply again.”