“I thought the entrepreneurship visa was exactly what I needed,” she said.

The law went into effect as soon as it passed, but when Ms. Carr contacted Spanish consulates in the United States, she couldn’t find people who knew it existed, let alone how it worked. Convinced that word would eventually trickle down, she moved to Madrid from San Francisco in late November 2013 without applying for the entrepreneur visa, aware that Spain allows American citizens to stay for up to three months as tourists. Early this year, she and Mr. Amoribieta, 37, incorporated their venture, Vidnex, while working from a business incubator in the Salamanca neighborhood of the city.

Vidnex offers an online tool that allows fitness instructors to teach classes remotely, streaming live video to their students. The classes are interactive, not prerecorded, with the student and the instructor able to see each other and talk in real time. Students can’t see their classmates.

Setting up the business in Spain, Ms. Carr said, was more challenging and required more formal documentation than she had expected. And getting residency presented challenges. One of the first applicants to try to use the law’s new entrepreneur visa, she found government workers unprepared to answer her questions. It was harder because she didn’t speak Spanish, but Mr. Amoribieta helped her navigate the bureaucracy by preparing paperwork and scheduling appointments, including one meeting in which officials assumed that Ms. Carr was a personal trainer using the Vidnex service rather than a co-founder.

Still, she managed to gain approval for her renewable, two-year entrepreneur residency permit in March, about a month after she applied under the new rules. Ms. Carr acknowledged that Spain, a country where unemployment reached a record high of about 27 percent last year, might seem an unlikely place to start a business. But when compared with European start-up magnets like London and Berlin, Spanish cities like Madrid and Barcelona have lower costs and fewer competitors — and still have sufficient talent to get started, she said. Technical expertise can cost a quarter of what it would in Silicon Valley, Mr. Amoribieta said.

Image In a Madrid cafe, Ms. Carr worked on plans for her new business. Credit... James Rajotte for The New York Times

Vidnex is housed in an incubator called Area 31, run by IE Business School. The incubator buoyed their efforts — founders at other start-ups helped them find a contract designer and interns. Connecting with Madrid’s entrepreneurs “was like finding my tribe a million miles from home,” Ms. Carr said.