Vanderhaeghe 's gritty , expansive novel is set in the late-19th-century wilds of northern Montana and Canada 's Northwest Territories , and follows a ragged , ill-tempered crew across the Canadian border .