from 1985 to 1987 dewar was president of the federal ndp, succeeding tony penikett. she was elected to the house of commons of canada in a 1987 by-election in the riding of hamilton mountain, replacing ndp incumbent ian deans. she had been invited to the riding in the hopes that, as a star candidate, she would keep the riding in ndp hands, but she faced strong competition for the nomination from future mp david christopherson. she was defeated in the 1988 general election, losing to liberal beth phinney by only 73 votes.