I invited the neighbors over for dinner.

Literal

Neighborhood [of-の] people [object-を] dinner [to-に] invited.

隣近所 ('neighborhood, the neighbors') is a compound reduplicating 隣 ('next') and 近所 ('nearby') — 'immediate neighborhood.' 招く ('to invite, beckon, welcome') takes に on the purpose (dinner). A warm social gesture.