1999 election, she again contested Te Tai Hauauru and won, before transferring to Tainui for the 2002 election. That seat was renamed Hauraki-Waikato ahead of the 2008 general election. She has held the seat since. Foreshore and seabed controversy In 2004, she joined Tariana Turia, another Labour MP, in voting against the first reading of her party's legislation on the controversial foreshore and seabed issue. She did not, however, join Turia when she quit Labour to found the Māori Party. In the bill's second reading, she again voted against her party, but in the third reading, she changed her position and supported it, saying that it was the politically pragmatic thing to do. In her third reading speech, Mahuta stated that she would withdraw from the Labour Party list at the next election to seek a renewed mandate from her electorate. Cabinet Minister: 2005–2008 In the 2005 general election Mahuta held her electorate seat of . Subsequently, Mahuta as part of the Labour-Progressive coalition government, was Minister of Customs, Youth Development, Local Government and Associate Environment. Mahuta lost her portfolios when Labour was defeated in the 2008 general election. In opposition: 2008–2017 Following the defeat of the Labour government in the 2008 election, and Labour's successive losses in 2011 and 2014, Mahuta held various appointments as Labour Party spokesperson for Māori Affairs, Education, Energy and Conservation. She was also deputy chairperson of the Māori Affairs select committee in the 51st Parliament. In 2009 Mahuta's Resource Management (Enhancement of Iwi Management Plans) Amendment Bill, which proposed giving more weight to Māori in resource-management decisions, was drawn from the members' ballot. The bill was defeated at its first reading in August. Mahuta twice contested Labour Party leadership positions. She supported David Cunliffe's leadership bid in 2011 and sought election as his deputy; both Cunliffe and Mahuta were unsuccessful. Cunliffe became leader in 2013 but David Parker was the deputy leader. Mahuta later stood for the Labour Party leadership in 2014 where she placed fourth. She considered retiring from politics at the 2017 general election after Maori King Tūheitia Paki changed his allegiance to the Māori Party. However, Mahuta eventually decided to stay on. She was not placed on the Labour Party list at that election in line with Labour's decision for its incumbent Māori electorate MPs to contest the electorate vote only. Cabinet Minister: since 2017 Mahuta served as a cabinet minister