The commissioner may receive from any insurance company of this State a deposit of any securities necessary to enable it to transact business in any other State, territory, dependency or Federal District of the United States or in any foreign country under the laws thereof. The securities shall be held by the commissioner as long as the company desires to transact business in the State, territory, dependency, Federal District or foreign country requiring the deposit but the company may draw the dividends or receive the interest on the securities. When the company desires to discontinue its business therein, and the deposit is no longer required by the laws thereof, the commissioner shall return the securities to the company depositing them. Before the commissioner shall return such securities deposited with him as aforesaid, the company shall institute an action and obtain a judgment therefor in the Superior Court substantially similar to that provided in section 17:20-3 of this Title.
N.J.S. § 17:20-4