Final answer:
New York City acted as the U.S. capital from 1789 until 1790, before it was moved to Philadelphia and eventually to Washington D.C. after the Compromise of 1790.
Step-by-step explanation:
New York City served as the nation's capital from 1789 to 1790. After George Washington's inauguration at Federal Hall, New York was the heart of the new United States government until the capital was moved as part of the Compromise of 1790. According to the Residence Bill passed in July of that year, Philadelphia would become the temporary capital for ten years while the permanent capital was being constructed along the Potomac River, eventually becoming Washington D.C. This strategic decision not only facilitated the federal government's assumption of state debts but also settled the contentious debate over the location of the nation's capital.