New York City and Northern Virginia will be the homes for Amazon.com Inc.’s second and third headquarters, according to people familiar with the matter, ending a more than yearlong public contest that started with 238 candidates and ended with a surprise split of its so-called HQ2.

The imminent announcement is expected as soon as Tuesday, according to the people. Other cities may also receive major sites, some of the people said.

Amazon is dividing the second headquarters evenly between New York’s Long Island City and Arlington County’s Crystal City neighborhoods, which are both located directly across from the major city centers. The company plans to evenly split the operations with as many as 25,000 employees in each location.

The decision effectively gives Amazon a major presence in three coastal hubs that politically lean left, at a time when tech companies are under scrutiny for their perceived elitism and liberal social views.

Amazon declined to comment.