Mr Magufuli won 84% of the vote, in a poll rejected by the opposition as fraudulent.
His main rival, Tundu Lissu, got 13% of the vote.
The election commission denied that the election was rigged.
Tanzania’s President John Magufuli has been sworn in for a second term following his victory in last week’s disputed election.
More than 12 countries have been represented at the ceremony, as well as delegates from the African Union and the Southern African Development Community.
Mr Magufuli took the oath of office at a sports stadium in the capital, Dodoma, with crowds streaming in from early in the morning.
Mr Magufuli won 84% of the vote, in a poll rejected by the opposition as fraudulent.
His main rival, Tundu Lissu, got 13% of the vote.
The election commission denied that the election was rigged.