A quarter century is a long time, but some things are worth the wait, and Michael Faillace, who lives on the Upper East Side, knew that his neighbor’s one-bedroom apartment was one of those things.

From the time Mr. Faillace bought his 1,100-square-foot apartment on East 86th Street near York Avenue for $184,000 in 1992, he began entertaining a fantasy shared by many New Yorkers. If he could commandeer the neighboring apartment, he could use that extra 800 square feet to expand his two-bedroom into a spacious four-bedroom home with panoramic city and East River views. All he had to do was convince the neighbors to sell to him.

As it turned out, that would not be such an easy task.

Neighbors have their own plans, and over the years Mr. Faillace, 61, missed out on two opportunities to buy the unit, learning a painful truth about the odds of actually buying your neighbor’s apartment: luck and timing are often as important as the money in your bank account.

In January 2018, after years spent nagging and cajoling his neighbors, Mr. Faillace, an employment lawyer, finally got what he wanted, but at a steep price. He convinced the most recent owners, a retired couple who used the apartment as a pied-à-terre, to move by agreeing to pay nearly $1 million for an apartment appraised at significantly less.