25.1 .-(1) In any action other than a family action within the meaning of rule 49.1(1) or an action of multiplepoinding, a defender may lodge a counterclaim against a pursuer-
(a) where the counterclaim might have been made in a separate action in which it would not have been necessary to call as a defender any person other than the pursuer; and
(b) in respect of any matter-
(i) forming part, or arising out of the grounds, of the action by the pursuer;
(ii) the decision of which is necessary for the determination of the question in controversy between the parties; or
(iii) which, if the pursuer had been a person not otherwise subject to the jurisdiction of the court, might have been the subject-matter of an action against that pursuer in which jurisdiction would have arisen by reconvention.
(2) A counterclaim may be lodged in process-
(a) at any time before the record is closed; or
(b) at any later stage, with leave of the court and subject to such conditions, if any, as to expenses or otherwise as the court thinks fit.
(3) A counterclaim shall be headed "Counterclaim for the defender" and shall contain-
(a) conclusions, stated in accordance with the appropriate short style, if any, in Form 13.2-B which, if the counterclaim had been made in a separate action, would have been appropriate in the summons in that separate action;
(b) a statement of facts in numbered paragraphs setting out the facts on which the counterclaim is founded, incorporating by reference, if necessary, any matter contained in the defences; and
(c) appropriate pleas-in-law.
25.2 .-(1) A defender who lodges a counterclaim may apply by motion for authority for diligence by-
(a) inhibition on the dependence of the action;
(b) arrestment on the dependence of the action where there is a conclusion for the payment of money
(c) arrestment in rem; or
(d) dismantling a ship,
(2) A certified copy of an interlocutor granting a motion under paragraph (1) shall be sufficient authority for execution of the diligence.
(3) A certified copy of an interlocutor granting authority for inhibition under this rule may be registered with a certificate of execution in the Register of Inhibitions and Adjudications.
(4) A notice of a certified copy of an interlocutor granting authority for inhibition under this rule may be registered under section 155 of the Titles to Land Consolidation (Scotland) Act 1868; and such registration shall have the same effect as registration of a notice under that section.
25.3 .-(1) Answers to a counterclaim may be lodged by a pursuer-
(a) where the counterclaim is lodged before the record is closed, within 14 days after the date on which the counterclaim is lodged; or
(b) in any other case, within the period appointed by the interlocutor allowing the counterclaim to be received.
(2) Where answers to a counterclaim have been lodged, the court may, on the motion of the pursuer or defender, allow such period for adjustment as it thinks fit.
25.4 .-(1) The right of a pursuer to abandon his action under rule 29.1 shall not be affected by a counterclaim; and any expenses for which the pursuer is found liable as a condition, or in consequence, of such abandonment shall not include the expenses of the counterclaim.
(2) Notwithstanding abandonment by the pursuer, a defender may insist in his counterclaim; and the proceedings in the counterclaim shall continue in dependence as if the counterclaim were a separate action.
25.5 .-(1) Where a proof or jury trial is allowed between parties to an action, the court may allow any counterclaim to proceed to proof or jury trial, as the case may be, before, at the same time as or after, the action as it thinks fit.
(2) Where evidence is led in a counterclaim separately from the evidence in the action, the evidence in one cause shall, so far as competent and relevant, be evidence in the other cause.
25.6 . A decree or other interlocutor which could have been pronounced in a separate action brought to enforce the conclusions stated in a counterclaim may be pronounced in respect of the counterclaim.