The Democratic Party has won control of both chambers of the United States Congress, dealing a significant electoral setback to President Donald Trump and his Republican Party two years before the end of his current term.

The victories mean Democrats will control the Senate and House of Representatives for the remainder of Trump's presidency, giving the opposition party greater influence over legislation, government spending and congressional oversight.

The results followed a campaign dominated by concerns about the rising cost of living, with voters expressing frustration over the prices of essential goods, particularly food and fuel.

Trump acknowledged that the United States' involvement in the war with Iran contributed to his party's poor performance. The conflict has coincided with increases in petrol and diesel prices, adding to pressure on households already dealing with higher living expenses.

Democrats also made significant gains in traditionally Republican territory, securing Senate victories in states including Texas, South Carolina and Kansas.

The Kansas result was particularly notable, as the state had not elected a Democrat to the Senate in nearly a century.

In another historic development, Michigan Democrat Abdul El-Sayed is set to become the first Muslim to serve in the US Senate, marking a milestone in the country's political representation.

The Democratic victories are expected to reshape the final two years of Trump's presidency. With Republicans losing their congressional majorities, the administration could face stronger opposition to its legislative proposals and increased scrutiny from congressional committees.

The results also highlight the influence of economic concerns on the midterm vote, with voters' dissatisfaction over living costs emerging as a central issue in the contest.