Rangers were 48 hours from going into administration until a £2m loan was agreed with Mike Ashley, according to one senior Ibrox source.
Prospective administrators had been contacted by the Ibrox club.
Newcastle owner Ashley put forward a financial package, which includes the option of a new share issue, on Friday and it was agreed on Saturday morning.
And, as part of the agreement, chief executive Graham Wallace will follow director Philip Nash in stepping down.
The arrangement could be finalised early next week.
English businessman Ashley, who owns 8.29% of the Glasgow club's shares, had called for the removal of Nash and Wallace as part of his offer.
Under Scottish FA agreement Ashley is not allowed boardroom influence or a shareholding of more than 10%.
But his possible underwriting of a share issue could take his stake above that threshold if there is not enough buy-in from other investors. An alternative option could be further loans.
The SFA plan to write Rangers next week seeking clarification on the loan agreement with Ashley.
Rangers need a financial injection to cover wages beyond November and Sale Sharks owner Brian Kennedy became a surprise latecomer in the battle for control with a funding package offer of his own.
In response to the news that Ashley's offer had been accepted by the board, Kennedy said he was "disappointed for Rangers" but would not be commenting further.
Former director Dave King had also offered fresh funding to Rangers but could not agree a deal following talks with key shareholder Sandy Easdale and the board.
Before returning to his South African business base on Thursday, King issued a statement saying that his group's offer remained on the table and that he was hopeful it would be accepted.
Ashley, who already has control of Rangers' shirt sales and retail division and owns the naming rights for Ibrox Stadium, refused to back King's proposal.
Sandy Easdale, who controls a 26% block of shares, also declined to agree to King's proposals.
While Ashley is demanding two representatives on the board, King also wanted to choose its chairman.
Nash, the former Arsenal and Liverpool executive, had been employed as a financial consultant by Rangers before joining the board in July.
Wallace, currently on a family holiday in Greece, and Nash had been supportive of the bid by King's group, which includes fellow Scottish businessmen George Letham and Paul Murray.